There is usefull method of the Array object that you may find of use here.
Splice() allows you to splice a section of the array. The sintax
is arrayName.splice(startIndex,lengthToRemove,valuesToAdd).
If you use ButtonArray.splice(buttonToRemoveIndex,1) it will remove
that element of the array
The way it way described to me is, as long as you maintain one reference
to the object, it will be retained. The object is only destroyed when
all references to it are destroyed.
x = new Button();
mybuttons[7] = x;
to truly destroy the button object:
delete x;
mybuttons[7] = null; // or howev
Has anyone come up with a good way to deal wiuth
arrays?
I want to dynamically add and remove buttons from
an array of buttons..
How about a linked-list.. will this work alright in
this environment?
Or will a linked-list be too resource
intensive?
I don't want to have to cludge by array of