-
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.yml
file into a script local array so its configuration settings are accessible to the framework. -
Load
app.livecodescript
which has the stack nameapp
from the folder containing theapp.yml
file. -
Load any externals specified in
app.yml
. -
Load helpers specified in
app.yml
whosepreload
property 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 theapp
stack. -
Create application data folders as specified in
app.yml
. -
Dispatch
PreloadApplication
message to theapp
stack. -
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 theapp
stack. -
Dispatch
InitializeApplication
message toapp
stack. -
Dispatch
OpenApplication
message toapp
stack.
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.