ID's are settable???

Bob Sneidar bobs at twft.com
Thu Jan 13 12:44:46 EST 2011


I recall in a thread a while back someone was trying to set the stack ID and was having trouble. I think the engine reverts it. 

Bob


On Jan 13, 2011, at 9:12 AM, David Bovill wrote:

> Richard - what happens in your test if you reset the ids of objects - can
> you reset the stack ID and hence that of all newly created objects by some
> combination of setting all the obects say back to their fressh id status?
> 
> That is is the stack id not automatically created as the incremental
> increase of the biggest real id - and not stored as a prop? If so it should
> work to reset the ids back to 1002++ with or without resetting the stack id?
> 
> On 13 January 2011 16:21, Richard Gaskin <ambassador at fourthworld.com> wrote:
> 
>> The good news is that the workaround is relatively simple:   if you see a
>> stack moving its IDs toward the limit, you can make a new stack and copy the
>> objects from the old one to the new one, effectively resetting their IDs to
>> start at 1002 again.
>> 
>> It might be nice to have the ID limit raised, or to find some method to
>> roll over and reuse unused IDs, but I recognize these options would be
>> costly to implement and indeed it's a rare case where one would need to be
>> concerned about it anyway.
>> 
>> But that said, I have one project which uses two data grids and a custom
>> control comprised of a few hundred objects which is rebuilt dynamically with
>> certain user actions.  In that project the IDs are currently over 2 million.
>> The good news is that the stack is never saved when running in the
>> standalone (the data is stored separately from the UI), so the IDs only
>> increment in development.  Still, I can expect that during the life cycle of
>> the project we will need to do the copy-and-paste to reset the IDs.
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list