dispatch and the target
Pete
pete at mollysrevenge.com
Fri Aug 12 12:27:00 EDT 2011
Hi Mark,
I decided to try a more orthodox method of doing this. The application now
includes a "start using" command for my library stack and the library stack
has a libraryStack message handler in it that does all the initialisation I
referred to.
However, the same problem still occurs, Referring to "the target" or "me" in
the libraryStack handler resolves to the library stack not the application
stack, which is consistant with how those keywords are defined in the
dictionary. And because the libraryStack message does not allow for any
parameters, I cannot pass in the application stack's name. I can use the
executionContexts to get the stack name of course but the dictionary claims
its format may change and it is not recommended to write code that depends
on its current format.
It appears there is no message path in these circumstances so I'm trying to
find a way to do what I need to do, absent the message path, not trying to
fight it.
Pete
Molly's Revenge <http://www.mollysrevenge.com>
On Thu, Aug 11, 2011 at 10:43 PM, Mark Wieder <mwieder at ahsoftware.net>wrote:
> Pete-
>
> Thursday, August 11, 2011, 9:41:49 PM, you wrote:
>
> > The dispatch methodology works fine but I'm finding that using "the
> target"
> > or "me" in the external stack's handler resolves to the external library
> > stack file not the stack that issued the dispatch command. I can, of
> > course, include the name of the dispatching stack as a parameter to the
> > handler but I'm wondering if there is a way to track down the dispatching
> > stack's name in these circumstances.
>
> In short, if you've gotten into this situation then it's time to
> rearchitect your application. You shouldn't have to ask this question.
> You're fighting the message path, and while what you want to do can be
> done, it ain't the right way to do things.
>
> That said, if you don't want to pass the calling stack as an argument
> you need to look at the executionContexts to get the call stack.
>
> --
> -Mark Wieder
> mwieder at ahsoftware.net
>
>
> _______________________________________________
> 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
>
>
More information about the use-livecode
mailing list