Peter Haworth pete at
Sun Feb 13 22:34:33 EST 2011

Thanks Monte and Mark.  The first thing I need to do is insert the scripts of a couple of button in one of the substacks as front scripts.  In the same substack, I have a bunch of buttons whose scripts are referred to as behaviors from controls within my application.  There are also a couple of other stacks that I refer to for various reasons from my application.

The intent of all this is to have a library of reusable code available to any and all applications I write.  I was given the stackfiles methodology some time ago by someone on this list, but perhaps it's not the best way to achieve what I want to do?

Pete Haworth

On Feb 13, 2011, at 7:17 PM, Mark Wieder wrote:

> Pete-
> Sunday, February 13, 2011, 6:49:41 PM, you wrote:
>> Need some clarification on the use of the stackFiles property.  I
>> have a file, xzy.livecode.  It has a mainstack and several
>> substacks.  I need access to the mainstack and some of the substacks
>> in my application. I set up a stackFiles entry referring to the main
>> stack with a path to the stack file, thinking that would get me
>> access to all the substacks but it looks like I have to set up a
>> stackFiles entry for each substack as well as the main stack, is
>> that correct?
> Well, personally I never touch the stackfiles property. I suppose it's
> got value if you need to package extra files that aren't substacks in
> a standalone application, and Monte no doubt can comment to this.
> So it depends on what you mean by "I need access". You want to refer
> to objects or properties in the substacks? You don't need to do
> anything special. Just refer to them by object-of-stack and you're
> done. But since that's so easy I'm guessing you mean something else.
> You need to get to scripts in your substacks? The easiest way is to
> issue the statement "start using stack abc", where abc is the name of
> the substack. That will make the substack a library stack, and the
> handlers in its script will be available to your main stack. If you
> just need access to a few handlers in a substack script then you might
> want to check out the "value" keyword, although I find its syntax
> clumsy enough that I use it sparingly and try to refactor things so
> that the function I'm trying to call ends up in the mainstack script.
> And then there are the "send" and "dispatch" commands.
> -- 
> -Mark Wieder
> mwieder at
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list