Object paths?

Troy Rollins troy at rpsystems.net
Tue Jul 20 15:54:40 CDT 2004


On Jul 20, 2004, at 4:30 PM, Brian Yennie wrote:

> I dunno if this helps at all, but if the issue is with opening some 
> other stack mid-script and having that affect your object references 
> later in the script, you could consider wrapping up your own stack 
> opening routine which maintains the defaultStack:
>
> on openStackSafe stackName
>    put the defaultStack into saveDefaultStack
>    open stack stackName
>    set the defaultStack to saveDefaultStack
> end openStackSafe

Thanks Brian, this is similar to the technique I described, too. In 
some case, it works, of course.

>
> Or is it more than you have long-running background scripts that 
> interact with specific stacks?

Exactly, and generally, those scripts, instead of messing about with 
the defaultStack, just address their issues using explicit paths. It 
would seem that sometimes explicit paths are the most straightforward 
way to deal with the issue. Probably the only real error I made was in 
assuming that others had encountered the need for similar pathing 
syntax due to extensive use of callbacks and async operations. 
Basically, my program loads and unloads stacks, creates objects and new 
stacks, saves stacks... many many times, and frequently with no user 
interaction whatsoever - all based on callbacks and data received from 
network and serial sources at relatively unknown intervals.

But further on this... if the defaultStack is closed, what determines 
what the new defaultStack is?
--
Troy
RPSystems, Ltd.
http://www.rpsystems.net



More information about the use-livecode mailing list