Hi everybody !
I just made the jump: ST2 to ST3, and I like make my own plugin, small ones, but it make coding a lot easier for me, so I don’t want to stop. The problem is that there is some differrance between 2 and 3. Indeed, I have this error (that didn’t exist when I was on ST2):
ValueError: Edit objects may not be used after the TextCommand's run method has returned
So, I understand that we can’t use a function that need the edit
arg outside of the run()
function of my plugin.
But I just can’t because I want to replace some text with the user input, as you can see:
self.window = self.view.window()
self.window.show_input_panel('Name of the function:', 'function_name', self.replaceText, self.replaceText, None)
You guess, I use view.replace
in my replaceText()
method. So I’m really confused
But I’m pretty sure there is a solution, I just can’t see it…
Thank in advance
Math2001