how do I call create a name of a button variable in a code, with a number in it? (hard to explain)
- by Sam Jarman
Ive got a int, that is changed in a previous method, that now has to be part of the name of a button variable
eg
int numberFromLastOne;
numberFromLastOne = 4;
I then want to get 'button4' to do something.
Could i use something like this?
[[button@"%d", numberFromLastOne] doSomethign:withSomethignElse];
Ive never had to do something this before....
Any ideas would be appreciated :)
Sam