Can one run out of IDs?

Peter T. Evensen pevensen at siboneylg.com
Thu Aug 24 11:17:18 EDT 2006


In doing more reading, I think I answered a lot of my questions.  ID's 
aren't reused.  The ID of the stack contains the last ID assigned.   Looks 
like IDs go for 1000-100,999.

I delete and create fields because it makes the code much 
simpler.  Otherwise I have to create "field management functions" to 
shuffle the fields around, hide ones that aren't used, make sure they 
aren't named in a way that will clash with fields that I am using.   This 
wouldn't be too hard, but would be much more complex and could be a source 
of bugs.

I'm also grouping fields to facilitate the layout.  There is no easy way to 
move a field from one group to another that I can see, except for cutting 
and pasting.  I suppose I could rework my algorithms to not use groups.

At 10:23 AM 8/24/2006, you wrote:


>Peter,
>
>Just curious : why do you delete & create fields ?
>Instead, why don't you work with a maximum set of fields (the
>maximum number of flds you'll ever need simulateously) and
>just replace the content of those fields on the fly ?
>
>JB
>
> > I am creating an app that creates and deletes a lot of fields.   It is
> > basically a educational title with cloze activities (i.e., fill-in,
> > like  "The d_ _ likes to ch_ _ _ the ball.")
> >
> > I read the content from an external text file and then copy an existing
> > field to get the different parts.  In the example above I create 10 fields
> > containing "The " "d" "_" "_" " likes to " "ch" "_" "_" "_" " the ball."
> >
> > I use separate fields so I can more easily control the placement of the
> > text so as to not have text moving as I replace the underscores with
> > letters (e.g. "_" is a lot wider than an "i", so if I have "dig" as "d__ a
> > hole," and I replace the first _ with i, the text after the I will move to
> > the left.)
> >
> > My concern is that with creating and deleting so many fields, I might run
> > out of IDs.  Are the IDs ever reused?
> >
> > This probably isn't a problem with the runtime, since the stack isn't
> > saved, so the next time the program is run, it will start with the same IDs
> > each time.  My main concern is in testing the program in the IDE and
> > ratcheting up the ID numbers.  Is this a valid concern?  Is there anyway to
> > "reset" the ID numbers?
>
>_______________________________________________
>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

Peter T. Evensen
http://www.PetersRoadToHealth.com
314-629-5248 or 888-682-4588 





More information about the use-livecode mailing list