Developing first on android

Monte Goulding monte at appisle.net
Sun Aug 20 19:31:07 EDT 2017


> On 21 Aug 2017, at 9:22 am, Brian Milby via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> 
> Ok, in that case, would the following work:
> 
> 
> 
> On openStack
> 
>      Set the behavior of me to stack "parent"
> 
>      Set the behavior of stack "child" to me
> 
> End openStack
> 
> 
> 
> There may be some need to check that referenced stacks are open, but just did some experimenting to verify that the calls work in the IDE.    I'm guessing you would want to possibly have them only set in one direction though.

That is what we do now although as a behavior can be used but not opened you would need to do that in the stack that uses the behavior. So you have stack A. The stack that uses the behavior which is a binary stackFile. Stack B the script only behavior of stack A. Stack C the script only behavior of stack B.

Right now you need to handle preOpenStack in stack A and setup the hierarchy because stack B does not retain the behavior property when saved and does not get any kind of message when used as a behavior. It may actually be a good idea to add a loadBehavior and unloadBehavior message sent to the object using the behavior so it can initialise its own heirarchy. Still I think saving the behavior property with the script only stack is a simpler solution.

Cheers

Monte


More information about the Use-livecode mailing list