I hope i can explain this clearly.
I have a NSMutableArray * myMut.
I have user input in the form of an NSString * anyoldString.
I have user input of some numeric values stored in the variable someNumber;
As users input their string and values, I want to update myMut, and name the fields anyoldString
like this: myMut.anyoldString=someNumber;
depending on the user’s input, the name will be different of course
i’m new to objective c.
in Matlab, I would do this:
myMut.(anyoldString)=someNumer.
I know that’s too easy for objective c! but any fast way to do this??
You’ll probably want to do something like so:
NSArrayand friends aren’t associative; but indexed. What you want isNSDictionaryand friends; your friendly neighborhood key-value mapping!Edit: For funsies; getting someNumber back out, given anyOldString: