The result of the execution must be either an object or an array of strings in order for JSON conversion to succeed. Background script functions should return one of these. The value will be undefined if JSON conversion fails or if no result is returned by the script.
Background scripts create Zuble core objects by calling the appropriate "Zbl.new..." methods. Call Zbl.newFile(), for example, to create a new ZFile object.
Background scripts create Zuble sprocket objects by first calling the Zbl.import() method once to load the Sprocket into the thread's object factory, then calling the Zbl.newObject() method for each new instance of the Sprocket object to be created.
Zbl.import() takes the following arguments:
Zbl.newObject() takes the following arguments:
The Zbl object provides timers for background threads. Pass a function to the Zbl.startTimerInterval() method and it will be called appropriately. Zbl.stopTimerInterval() will stop timers individually. Zbl.stopAllTimers() will stop all Zbl timers for this thread.
Zbl.startTimerInterval() takes the following arguments:
Background script theads can send signals to their containing ZScriptThread objects by calling the Zbl.alert() method. It takes the following arguments:
Originating threads connect signal handlers to the ZScriptThread::alert signal to receive alerts from background threads.
Zuble documentation copyright © 2019 Bob Dinitto. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Zuble is a derivative work of Qt version 5. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.