Start Using

Rob Cozens rcozens at pon.net
Sun Dec 12 10:54:43 EST 2004


>Do I first "go" to the library stack file or can I
>just "start using" the stack file directly.

Morning Gordon,

There is no need to go to a stack before one starts using it.

In fact, going to the library may trigger open/preOpen handlers that 
do things that are unnecessary or interfere with its role as a 
library.  (If a Library needs to initialize when put in use, do it in 
a libraryStack handler.)

Have the stack that can't find the handlers list the stacksInUse for 
you just before making the call.  If your library stack is on the 
list and the handler called is in the library stack script, it should 
be found.

One possible gottcha: if you have a function, foo, in the library 
stack and call it as a command in the button script, you will get a 
"handler not found" error.  Likewise if you have a command, foo, and 
call it as a function.
-- 

Rob Cozens
CCW, Serendipity Software Company

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)


More information about the use-livecode mailing list