Implementing a library of behavior buttons across multiple applications

Peter Haworth pete at mollysrevenge.com
Tue May 25 13:36:13 EDT 2010


Thanks for the explanation Richard.  This stuff isn't made any easier  
by the fact that there are multiple names available for the same thing  
- behavior=parentScript apparently.

Getting back to Mark's answer and the use of stack files, I see two  
separate places where additional stack files can be specified - the  
stackFiles property of the main Stack (or the equivalent pane in the  
main stack inspector), and the Stacks pane of the Standalone  
Application Settings which gives rise to the question, what is the  
relationship between these two settings? Does one override the other?   
Is stackFiles operative for the development environment only and the  
standalone setting for standalone applications only?

Pete Haworth

On May 25, 2010, at 10:00 AM, use-revolution-request at lists.runrev.com  
wrote:

> Message: 7
> Date: Tue, 25 May 2010 09:33:27 -0700
> From: Richard Gaskin <ambassador at fourthworld.com>
> Subject: Re: use-revolution Digest, Vol 80, Issue 81
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Cc: Runtime Revolution Support <support at runrev.com>
> Message-ID: <4BFBFBD7.7090606 at fourthworld.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Peter Haworth wrote:
>
>> I'm glad to gear such a simple solution!  My concerns were all based
>> on the following in the dictionary entry for "behavior":
>>
>> "The behavior property is a reference to a button containing the
>> script to use. It is in the format of a long ID."
>>
>> I guess I need to be more careful about believing what the dictionary
>> says!
>>
>> Pete Haworth
>
> The docs are kinda correct, but just don't tell the whole story (I'm
> cc'ing support here so the Dictionary entry can be updated to reflect
> the full story):
>
> You can use the long ID of a button to set the value of the behavior
> property for an object, but once it's set it gets stored using only  
> the
> short name of the stack the behavior button is in.
>
> This is explained more fully in the ParentScriptNotes.txt document
> included with the Rev install:
>
>
>    PARENT SCRIPTS - RESOLUTION
>
>    A control's parent script reference is saved in the stackfile
>    as three pieces of information:
>      1) button id
>      2) stack name
>      3) mainstack name (if stack is substack)
>    This is the minimum required information to uniquely identify
>    a button within a running Revolution environment.
>
>    Immediately after loading a stack file, an attempt is made to
>    resolve all parentScript references - the engine acts as if
>    it constructs a control reference:
>      button id <id> of stack <stack name> [ of stack <mainstack  
> name> ]
>    And attempts to access it. Thus, the stackFiles property will be
>    searched as appropriate and any needed stacks will be loaded.
>
> --
>  Richard Gaskin
>  Fourth World
>  Rev training and consulting: http://www.fourthworld.com
>  Webzine for Rev developers: http://www.revjournal.com
>  revJournal blog: http://revjournal.com/blog.irv




More information about the Use-livecode mailing list