preOpenStack - Main stack script affects SubStack when it opens?

Terry Judd tsj at unimelb.edu.au
Tue Dec 7 21:29:58 EST 2010


This is normal behaviour. The ways around it are...

1. an empty preopenstack handler in the substack
2. stack specific code in the main stack preopenstack handler

on preopenstack
   if the short name of me = [mainstack name] then
      do stuff
   end if
end preopenstack

3. move the preopenstack handler to the card script of the first card of the
main stack

Hopefully I've got that right.

Terry...


On 8/12/10 1:19 PM, "Glen Bojsza" <gbojsza at gmail.com> wrote:

> Maybe it's me or should this not be happening. Livecode 4.5.1.
> 
> I have a mainstack that has a preOpenStack that does some house keeping...
> 
> I just added a substack that is opened from the mainstack by a user clicking
> a button.
> 
> **There is NO preOpenStack in the substack
> 
> When the substack opens the preOpenStack of the mainstack tries to run which
> generates an error since none of the objects on the mainstack are on the
> substack.
> 
> Should preOpenStack only work with the stack that contains it?
> 
> If this is the proper way the system works then what is the work around?
> 
> thanks,
> 
> Glen
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

--
Dr Terry Judd | Senior Lecturer in Medical Education
Medical Education Unit
Melbourne Medical School
The University of Melbourne






More information about the use-livecode mailing list