How to Reset ID's of Controls

dunbarx at aol.com dunbarx at aol.com
Mon Jan 27 12:36:38 EST 2014


I was comforted back in the day with engine assigned ID's that were not user settable. It was nice to know that these were unique and somewhat apart from all other properties.


What was the rationale for making them changeable? Broadly, this should not be any sort of detriment, in that more control is always better. Right? But I would rather have had a new property if another one was needed to reference an object, and leave the rock-solid ID alone.



Craig


-----Original Message-----
From: Richard Gaskin <ambassador at fourthworld.com>
To: use-livecode <use-livecode at lists.runrev.com>
Sent: Mon, Jan 27, 2014 9:59 am
Subject: Re: How to Reset ID's of Controls


Ender Nafi wrote:

> I have an app which is been developed for a very long time.
> Many controls; including buttons, field, images, etc,; have been added and 
deleted countless times.
> Thus, the id’s of objects are now in 6 figures: 107620.
> It worries me somehow; because of int16 thing.
> You know, no object’s size or location values can exceed 32768.

IDs are 4-byte integers, so the range goes all the way up to 4294967295.

While less urgent than it would be if the range only went to 32768, it's 
still something I wouldn't mind seeing addressed at some point.

64-bit values would provide peace of mind but at the cost of space.

Rolling over would require some table where unused IDs are stored, which 
would not only eat space but add complexity.

Walking through all objects to find an available ID would take less 
space but more time.

I don't have an easy answer for this one, but at least it's not an issue 
we're likely to have problems with soon.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys

_______________________________________________
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