Eric Yun wrote:
I created many buttons in a frame. Currently I use "buttonXY" to name
for them, X and Y stands for the No. of the row and column of the
button. For example, button24 means the button in the second row, and
the forth column.

Right now I found such a scheme has some problems. For example, if I
want to do an operation to all buttons, I have to call the same
function many times. If, I think, I can put these buttons in an
array, I will be able to use a "for" loop.

I cannot find a solution for this. It seems all buttons' IDs are type
UInt16. I am using Codewarrior 9.2; how can I change their IDs (or
just put them in a two-dimention array according to their positions)?

I think you answered your own question. Make an array (1D or 2D whichever is more appropriate for what you need to do with them) and just copy all the values into the array.


--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to