startup question

Dave Cragg dcragg at lacscentre.co.uk
Thu Apr 13 04:50:40 EDT 2006


On 13 Apr 2006, at 02:32, Stephen Barncard wrote:

> I have a chicken-and-egg situation..
>
> I have a stack startup handler that works fine until it does a  
> 'start using' for a library stack, and then immediately needs to  
> use a handler in that stack just included.
>
> What happens is that the code keeps marching along, the lib isn't  
> active yet... and --- error.
>
> I've put a 'wait 30 ticks' then a 'wait 60 ticks' before  
> continuing. Not long enough? I know, I know, cheesy too.
>
> What's the best way to allow the lib to load.. and how do I wait or  
> hold for it?
> I know there's an 'librarystack' message..

I don't have a solution, but I'm surprised at the behavior.  
Generally, libraries called in this way are available immediately.  
(I'm thinking of cgi scripts that start using a library in the  
startup handler.) Do you know of anything in the library itself that  
might be causing this? Right now, the only thing I can think of is  
the library calling one of the Rev library handlers (commands  
beginning with rev, or a url request requiring liburl), as the Rev  
libraries don't load until after startup.

Cheers
Dave



More information about the use-livecode mailing list