Binary String to Enable Objects

Camm29 Camm29 at tesco.net
Sat Nov 19 13:02:11 EST 2005


Great idea using ID's , thanks to all involved.
Camm29
----- Original Message -----
From: "Richard Gaskin" <ambassador at fourthworld.com>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: Saturday, November 19, 2005 3:51 PM
Subject: Re: Binary String to Enable Objects


> Rob Cozens wrote:
> > Hi Alex,
> >
> >> That's neat !  I would never have thought of using the IDs - I've
> >> never set an ID to a specific value
> >
> >
> > You can only set image ids: the ids of other controls cannot be changed.
>
> But you can use the altID property for the same effect.
>
> Object IDs and altIDs are checked in object layer order, like this:
>
> 1. Object #1 true ID
> 2. Object #2 altID
> 3. Object #3 true ID
> 4. Object #4 altID
> ...
>
> This does require some care to work with, as it's possible to set the
> altID of one object to the ID of another, so anything attempting to
> reference the second object by ID will actually find the first object.
>
> The range of numbers for altIDs goes up to 65535, and if you start with
> a number well above the number of objects in your stack plus a few
> thousand you should never have a conflict.
>
> Built-in IDs start at 1001 and all objects are apparently incremented
> from the same counter, so a new card will be 1002, a button added there
> will be 1003, etc.
>
> So if you know the sum of all objects will be fewer than 9000 (that
> would be a hefty project), you could safely start your altIDs at 10000.
>
> --
>   Richard Gaskin
>   Managing Editor, revJournal
>   _______________________________________________________
>   Rev tips, tutorials and more: http://www.revJournal.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list