path of a 'closeStackRequest'

Ken Ray kray at sonsothunder.com
Thu Jan 16 15:17:00 EST 2003


Graham,

One of the simplest approaches I've used in mainstacks is this:

on openStack
  if the owner of the target is me then
    -- it's just the mainstack
  else
    -- it's a substack
  end if
end openStack

Of course, this can be used with preOpenStack, openCard, etc...

Have fun!

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message -----
From: "Graham Samuel" <livfoss at blueyonder.co.uk>
To: "Revolution user discussion" <use-revolution at lists.runrev.com>
Sent: Thursday, January 16, 2003 12:47 PM
Subject: Re: path of a 'closeStackRequest'


> Thanks to all who replied: I think I know where I am now. Pity there
> is no clear documentation of the message path... still there are so
> many helpful people on this list that I guess it doesn't matter all
> that much.
>
> On 16 Jan 2003 08:15:04 -0800 Richard Gaskin
> <ambassador at fourthworld.com> wrote:
>
> >The mainstack in Rev acts as the project script in SuperCard, accessible
to
> >all substacks.
> >
> >If your mainstack has only one card consider putting its unique scripts
> >there. Or you could leave it at the stack level and put an "if" in the
> >relevant handlers to check the short name of the stack.
>
> Yes, as an old SuperCard hand I had never noticed that the
> 'openWindow' message for any window would pass to the project script.
> I guess that's because I used a startUp handler for my
> initialisation, and realising that I wouldn't get one in the
> Revolution Development Environment, I switched my initialisation to a
> preOpenStack handler in the mainstack script. However, if one does
> this, it's necessary to check that the target of the handler is the
> actual mainstack, as several people have pointed out. On to the next
> problem...
>
> Thanks again to all
>
> Graham
> --
> -------------------------------------------------------------------
>           Graham Samuel / The Living Fossil Co. / UK & France
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list