where does "startup" message go when in IDE
Richard Gaskin
ambassador at fourthworld.com
Sun Jul 5 13:01:10 EDT 2015
It's helpful to remember that the IDE is just a collection of stacks,
which are run automatically whenever the development engine is launched.
So the Dictionary's explanation is correct, and the recipient of the
startup message when running the IDE will be the IDE.
To initialize stacks simply and robustly in both development and at
runtime, I use a preOpenStack handler in the script of the first card of
the mainstack I'll later use to build the standalone from.
I don't think I've used the startup message since HyperCard. HC never
had any "pre" messages, and its IDE was written in a language other than
its own, so the startup message was useful if not necessary there in
ways that LC offers us much more control over.
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
dunbarx wrote:
>
> The dictionary says the message goes to the first stack in a new session. But I think the reason you are not trapping it if you place a handler in the stack script, and open that stack in a new session, is that other stacks open before the one you, say, double click on in the finder.
>
>
> Or I am wrong about that.
>
>
> Craig
>
>
>
> -----Original Message-----
> From: Dr. Hawkins <dochawk at gmail.com>
>
> I've found the startup message, to be sent to the first stack opened.
>
> It
> seems useful, but I haven't been able to trap it in the IDE.
>
> In particular, I
> found an incantation to hide the stack or some such for
> use at the command
> line.
>
> Is it going to an IDE card? Could I simulate it with a
>
> if the
> environment is "development" then
>
> dispatch "startup" to me
>
> end if
>
> as
> the first item of preOpenStack of the main stack (hmm, I suppose
> in
> beforePreOpenStack . . .)
>
> --
> Dr. Richard E. Hawkins, Esq.
> (702)
> 508-8462
More information about the use-livecode
mailing list