Home Download Buy Blog Forum Support

API doc out-of-date?

API doc out-of-date?

Postby misterade on Fri Apr 19, 2013 8:13 pm

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
Code: Select all
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
Code: Select all
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 ;)
misterade
 
Posts: 4
Joined: Fri Apr 19, 2013 7:45 pm

Re: API doc out-of-date?

Postby FichteFoll on Thu May 16, 2013 2:10 am

The function you are searching for is:
Code: Select all
sublime.set_timeout(callback, timeout)

timout in ms. This function is documented.

Code: Select all
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.
FichteFoll
 
Posts: 388
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany

Re: API doc out-of-date?

Postby misterade on Fri Aug 22, 2014 10:58 am

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 :(
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?
misterade
 
Posts: 4
Joined: Fri Apr 19, 2013 7:45 pm

Re: API doc out-of-date?

Postby FichteFoll on Fri Aug 22, 2014 6:11 pm

There is hope: viewtopic.php?f=2&t=16459

Btw, I'm using search.php?search_id=egosearch to keep track of topics.
FichteFoll
 
Posts: 388
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany

Re: API doc out-of-date?

Postby mwb1100 on Mon Aug 25, 2014 8:21 am

misterade wrote:I didn't receive a notification e-mail


Unfortunately, e-mail notification is not enabled on the Sublime Forum.
mwb1100
 
Posts: 36
Joined: Mon Jun 25, 2012 5:40 pm


Return to Plugin Development

Who is online

Users browsing this forum: Exabot [Bot], madevilgenius and 5 guests