Hi, a question for ST3 gurus.
I try to use the new async event listener in various plugin and have some issues beginning with this one:
When async event is called, the underlying view could have been modified, which is perfectly understandable.
But in some case, it look like the view is in a closing state, where lot of it’s method isn’t available.
With this code:
[code]import sublime, sublime_plugin
class ExampleCommand(sublime_plugin.EventListener):
def on_load_async(self, view):
print(view.file_name())[/code]
If I open the Goto Anything (ctrl+p) panel and slowly navigate among unopened files, the filenames are printed in the console.
If I navigate quickly among unopened files, the filenames is replaced with a None in the console.
It’s probably because the view is already closed before the event is triggered.
My question is:
How I can detect that the view is in a closing state ?
Thanks for your help.