Geometry in latest version of RunRev

Dave dave at looktowindward.com
Thu Nov 1 06:22:03 EDT 2007


On 1 Nov 2007, at 02:32, Richard Gaskin wrote:

>
> Sounds a lot like the GM to me.  It handles a lot of basic  
> situations well.

Yes, but at the drop of a hat it goes Beswick!

>
>
>> I hate using hard object names in scripts and in fact I never do   
>> except in a demo or test app.
>
> There are three main ways to refer to objects with Rev:  ordinal  
> number, name, or ID.
>
> The ordinal number is usually the most error-prone, as it changes  
> whenever you add or remove objects.
>
> The ID is unique and usually immutable, but has zero mnemonic value  
> so it makes scripts very difficult to read.
>
> Unlike an ID, the name of an object is up to the developer so it  
> can have strong mnemonic value.  And since just about every Rev  
> object which can display its name also provides a label property,  
> you can change the visible label of the object without ever needing  
> to change the name.
>
> So I tend to use names much like IDs, but more memorable.  I can  
> change the label at any time without ever needing to change the name.
>
> Which of these three ways to refer to objects do you use?

None of them! I set a "listen" (Based on a MessageID and MessageKind)  
in the object that wants to get the message, then I just send to this  
MessageID and MessageKind. The object receives the message, and,  
since it's running in the object's script, can use "me".

That way I can copy objects around, dupe them, whatever and other  
parts of the stack(s) don't break!

All the Best
Dave




More information about the use-livecode mailing list