message hierarchy question
Jim Ault
JimAultWins at yahoo.com
Thu Jan 5 00:08:40 EST 2006
On 1/4/06 8:02 PM, "Mark Wieder" <mwieder at ahsoftware.net> wrote:
>But... stack B needs to be able to call handlers in subStack 1 of
> stack A, and I haven't figured out how to get the substack into the
> message-passing hierarchy.
In order to keep the nature of the library stack, which I appreciate, why
not try one of these three ideas...
start using stack {that I want to be in the hierarchy}
start using stack subStack 1 (library stack)
-or-
set the script of {an object that can be in a back script} to the script of
{an object that cannot} (eg. stack script of subStack1)
-or-
catch the message in mainStack script
on forSub1btnClkPause
send " btnClkPause" to stack subStack1
end forSub1btnClkPause
--sorta defeats the effectiveness of the term 'library', though, eh?
All of this is untried at the moment, but I think one of these will work.
Did not know that
On 1/4/06 8:02 PM, "Mark Wieder" <mwieder at ahsoftware.net> wrote:
> All-
>
> I've stumbled on something that is very annoying, or at least I think
> it is, now that I think I've figured out what's going on. Took me most
> of the day playing around with this...
>
> It appears that you can't put the scripts of substacks into front or
> back scripts. Here's what I'm faced with:
>
> stack A:
> mainStack
> subStack 1 (library stack)
> subStack 2 (library stack)
>
> stack B:
> mainstack
>
> What I'd like is to be able to load stack B at runtime (allowing for
> switching to different but similar stack Bs). I've sort of got that
> part working, inserting the script of stack B from hard disk into the
> front. So far, so good.
>
> But... stack B needs to be able to call handlers in subStack 1 of
> stack A, and I haven't figured out how to get the substack into the
> message-passing hierarchy. Inserting the script of substack 1 doesn't
> give me any errors, but only the path to stack A appears in the list
> of backscripts. That part's fine, but messages don't get down to the
> substack level.
>
> Here's what (I think) I want for a message hierarchy from front to
> back:
>
> stack B (frontscript)
> stack A
> subStack 1 (backscript)
>
> My options seem to be:
> 1. forget the library substack, move everything to the mainstack
> 2. make the substack a separate file
>
> any other ideas?
More information about the use-livecode
mailing list