-
Notifications
You must be signed in to change notification settings - Fork 14
levure.livecodescript
The levure.livecodescript script-only stack file provides the primary framework functionality. It has the stack name levureFramework when it is open in memory while your application is running.
You should not edit the levure.livecodescript file. You can keep it updated to the latest version by updating the levure folder in your application project folder.
The levure.livecodescript script plays a key role for your application in the following areas:
- Application startup
- While your application is running
- Application shutdown
- Packaging your application distribution builds
When your application is started with the standalone, the levure.livecodescript file is opened and its levureFramework script is attached to the standalone stack or executable as a behavior. The levureFramework script is then placed into the message path with start using so the framework handlers are globally accessible throughout your application.
When LevureFramework is first loaded it manages the startup of your application by performing a series of actions:
-
Load the contents of the
app.ymlfile into a script local array so its configuration settings are accessible to the framework. -
Load
app.livecodescriptwhich has the stack nameappfrom the folder containing theapp.ymlfile. -
Load any externals specified in
app.yml. -
Load helpers specified in
app.ymlwhosepreloadproperty is true. Any helper included with the framework is preloaded. When a helper is loaded all extensions, libraries, backscripts, and frontscripts that make up a helper will be loaded. Any UI stacks in the helper are added to the list of stackFiles of theappstack. -
Create application data folders as specified in
app.yml. -
Dispatch
PreloadApplicationmessage to theappstack. -
Load remaining application assets as specified in
app.yml. Extensions, libraries, backscripts, frontscripts are loaded into memory. UI stacks are added to list of stackFiles of theappstack. -
Dispatch
InitializeApplicationmessage toappstack. -
Dispatch
OpenApplicationmessage toappstack.
After startup, while your application is running, you can call the levureFramework handlers and functions defined in the Levure API.
When your application quits, levureFramework handles the LiveCode shutdown message and dispatches the PreShutdownApplication message to the app stack where you can perform any cleanup operations.
When you package your application for distribution, you call the levurePackageApplication handler in levureFramework to invoke the packaging process.
Levure is an application development framework written for LiveCode.