Sublime Forum

API doc out-of-date?

#1

Hello everybody, I’m new to the forum and the ST2 plugin developing although I have been using ST2 for a while now.
I was looking to the source of a plugin when I realised that the run_command function can’t be called inside a thread to run another command of the same plugin.
Looking in the forum I found the function sublime_plugin.run_timed_function which seems do the trick but is not reported in the official API documentation and I wonder why.
Is the documentation out-of-date?
Should I refer to a different doc?

Thank you :wink:

0 Likes

#2

The function you are searching for is:

sublime.set_timeout(callback, timeout)

timout in ms. This function is documented.

sublime_plugin.run_timed_function simply wraps the callback in a time diff block that will display an error message when the diff is too high (the “A plugin may be making Sublime Text unresponsive” message from event listeners). It won’t solve your thread issues. Also, it is ST2 only and the ST3 API in general is thread-safe.

0 Likes

#3

Sorry I just notice your answer (better late than never), and no, I didn’t receive a notification e-mail and never noticed that unread message :frowning:
Thank you for the answer, so is correct to assume that the ST3 docs is not a work in progress like it is said for the ST2 docs?

0 Likes

#4

There is hope: We're improving the Unofficial Docs - Support us!

Btw, I’m using search.php?search_id=egosearch to keep track of topics.

0 Likes

#5

Unfortunately, e-mail notification is not enabled on the Sublime Forum.

0 Likes