Substack trouble

Richard Gaskin ambassador at fourthworld.com
Sun Mar 23 18:11:01 EST 2003


> When I open it from the msg box like this:
> 
> open stack "devVK.1"
> 
> It tries to run the script of the main stack and, of course, throws an
> error window.
>
> I looked in the docs and it suggests putting:
> 
> on openStack
>   exit openStack
> end openStack
> 
> ...into the substacks script, but that will prevent the substack's
> openStack handler from running, won't it?

You may be able to handle this well in just one place:

If your mainstack has only one card, or if you know it will always open to
the first card, you could just move your mainstack's openstack handler to
the card of your mainstack.

Another option would be to add a condition to you mainstack's openstack
handler:

  on openstack
    if (the short name of this stack is "mainstackName") then
      -- do your stuff here
    else pass openstack
  end openStack


-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.2: Publish any database on any site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the use-livecode mailing list