Start Using

Klaus Major klaus at major-k.de
Sun Dec 12 10:50:30 EST 2004


Hi Gordon,

> Dear Revolutionaries
>
> I have created a little generic library stack with a
> button that I am using the custom properties of, to
> store global variables.
>
> In the stack script, I have 2 small functions
> "setGlobal" and "getGlobal" that set and get the
> custom properties of the button.
>
> I have tried having other stacks "go" to this stack
> and then "start using" this stack, but I am unable to
> get the "setGlobal" and "getGlobal" handlers to be
> visible in the calling stacks (I get "handler not
> found" type messages).
>
> I have also tried having the library stack insert its
> own script into back in its own onPreOpenStack handler
> or having the calling stack do this - to no avail in
> any case.
>
> The built in docs are rather scant and disorganized
> and I am still waiting for my rev manuals and Dan's
> book, so I don't have much to work from.
>
> Do I first "go" to the library stack file or can I
> just "start using" the stack file directly. I don't
> want to statically build it in to my main app as I
> want it to be a kind of reusable plugin.
>
> What am I missing here? What is the procedure I need
> to get this to work?

you only need to "start using stack xyz" once, no need to "go" there!

If it is a substack this line in the mainstack should be sufficient:

on openstack
   start using stack "my library"
   ...
end preopenstack

Then all the handlers of that substack are available to all objects ind 
any stack...

Hope that helps...

> Best
>
> Gordon

Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de



More information about the use-livecode mailing list