use-revolution Digest, Vol 80, Issue 81

Peter Haworth pete at mollysrevenge.com
Tue May 25 12:10:18 EDT 2010


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


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

> Hi Peter,
>
> No, you don't need to include the operating system's path to the stack
> file. For example, the following is a correct reference for a
> behavior: button id 1015 of stack "Untitled 1"
>
> You can keep one copy of your stack with parent objects on your hard
> disk and add this stack to the stackfiles property of the mainstack of
> your project. When you build the standalone, the stack will be copied
> into your standalone and above reference will still work.
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
>
> Economy-x-Talk is always looking for new projects. Contact me for a
> quote http://economy-x-talk.com/contact.html
> Download Clipboard Link http://clipboardlink.economy-x-talk.com and
> share the clipboard of your computer over the local network.
>
> On 24 mei 2010, at 22:03, Peter Haworth wrote:
>
>> I'm trying to figure out the best way to make a library of behavior
>> buttons available to multiple applications.
>>
>> I originally developed the library as a substack of my application
>> but would now like to move it to a separate .rev file and refer to
>> it from other applications.  Seems like that gives me a single
>> maintenance point - fix any behavior problems in the library and
>> it's automatically fixed in all applications.
>>
>> However, it's feeling like this isn't a practical solution.  As I
>> understand it, the behavior property of an object uses the long id
>> of the button it refers to and I think the long id includes the
>> operating system path to the .rev file that the button is in.
>>
>> Just for development purposes, I have three different folders I use
>> - one for code and test, another for QA, and anther for the final
>> application.  SO if I set the behavior to point to my library of
>> behaviors in the code and test folder, then move the app's .rev file
>> to the QA folder, the behavior properties will still point to the
>> behavior library of in the code and test folder.  And so on.
>>
>> I'm sure there much more experienced users than me out there who
>> have run into this problem and hoping they can share how they dealt
>> with it.  Only thing I can think of is a script that runs during
>> installtion to go find all controls with a behavior property set and
>> change it to the correct one.
>>
>> Pete Haworth
>




More information about the Use-livecode mailing list