How to Reset ID's of Controls

Richard Gaskin ambassador at fourthworld.com
Mon Jan 27 09:58:15 EST 2014


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




More information about the use-livecode mailing list