J. Landman Gay
jacque at hyperactivesw.com
Mon May 3 18:19:09 CDT 2010
Paul D. DeRocco wrote:
>> From: J. Landman Gay
>> Startup is the only time you can set the externals of a stack and have
>> it work. The handler will never trigger during development because the
>> IDE gets the startup message. But when running as a standalone, the
>> mainstack will get a startup message and the externals get set
>> correctly. Then I just need to remember to put the external files in the
>> correct relative location in the standalone folder before shipping.
> As someone who's just learned enough of Revolution to write one rather basic
> app, I'm having trouble understanding the documentation on the "startup"
> message. The docs mostly seem to be about U3 drives, which is irrelevant,
> but the example implies that in a non-U3 situation the mode parameter is
The mode parameter only applies to U3 apps. It isn't needed or used any
other time, and was only added later on when Rev began supporting U3 builds.
> But then there's this: "If the application is opened with multiple
> stacks, the startup message is sent to the first stack opened." Does this
> mean to imply that something different happens if there's only one stack?
No. The first stack, even if it is the only one, gets the startup
message. Startup is only sent once, immediately on launch, before any
other messages or actions occur. It's the first thing that happens,
before any stacks load.
> If not, does it get sent before preOpenStack?
Yes. Before everything.
> Do I understand your example to
> mean that it happens before the externals are loaded?
Yup. Which is why it's the only time you can set externals, because no
stacks are loaded yet. Startup is like ground zero. After that, the
first stack loads (with its newly set externals) and by then it's too
late to change its externals.
> Does preOpenStack happen after the externals are loaded?
> If so, then it looks like I could
> simplify my code, and just do everything in the "startup" handler.
That's what I do. :)
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode