Finding the main stack
pete at mollysrevenge.com
Thu Jul 7 22:44:26 CDT 2011
I'm beginning to think the same thing. However the dictionary entry for
"the target" says it resolves to the object that "originally received the
message" and since the start using command came from the preOpenCard handler
of a card in the application stack, I took that to mean the card that issued
the "start using" command.
I can easily get round this by calling the initialise handler from the
original card immediately after the start using command - I was hoping to
make things as simple as possible for the people who want to incorporate my
library into their stacks but I guess one extra line of code is no big deal.
The custom property holds a list of databases to be opened by the library.
Molly's Revenge <http://www.mollysrevenge.com>
On Thu, Jul 7, 2011 at 7:48 PM, Mark Wieder <mwieder at ahsoftware.net> wrote:
> Thursday, July 7, 2011, 6:12:32 PM, you wrote:
> > When the app starts up, I issue a "start using" command to bring in my
> > library handlers. I have a libraryStack handler which needs to get hold
> > the value of a custom property in the main stack of the handler that
> > the "start using" command.
> In that case, that sounds like the wrong architecture. My thinking is
> that a library stack shouldn't have to have a knowledge of the stack
> using it. Otherwise it might just as well be a substack of the
> mainstack, and then your troubles are over.
> Is there another paradigm you can use other than a custom property of
> the stack that uses the library?
> -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