dispatch and the target
pete at mollysrevenge.com
Fri Aug 12 12:27:00 EDT 2011
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
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
Molly's Revenge <http://www.mollysrevenge.com>
On Thu, Aug 11, 2011 at 10:43 PM, Mark Wieder <mwieder at ahsoftware.net>wrote:
> Thursday, August 11, 2011, 9:41:49 PM, you wrote:
> > The dispatch methodology works fine but I'm finding that using "the
> > 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:
More information about the Use-livecode