• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 3. Creating a User Interface > Scheduling Tasks from Callbacks

Scheduling Tasks from Callbacks

You cannot call the execJS method from within a callback function (either stored in a jsCallbacks property or passed as an argument to the dialog open or run method). This attempts to re-enter the JavaScript engine, which is already running and is not re-entrant. If you try to do this, Bridge will hang.

The alternative is to schedule a task, using the App Object’s scheduleTask (page 102) function, from within the callback function. From the function associated with the task, you can call execJS. Because it is not executed until the callback returns, the task is free to make another remote call.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint