Newbie question: Can one substitue commands, properties or methods for NSStrings or char at runtime?
Lets say I do something like this:
//these are the names of my properties of an NSObject I created
char theChangingProperty[17][18] = {"name", "title", "number", "property4", "property5", "property6", "property7", "property8", "property9", "property10", "property11", "property12", "property13", "property14", "property15", "property16", "property17"};
(PS I know there is a better actual objective-c way of getting an objects properties, I even found a post with this Get an object properties list in Objective-C)
anyway, how does one iterate through a list and have the property name change? Lets say I'm using dot notation at runtime during a loop... If I wanted to set 17 (or 100!) different properties of my object all to values of some other array all at once, like this:
for (int t=1; t<17; t++) {
myObject.theChangingProperty[t] = valueOfAnotherArray[t];
}
I know objective-c is going to look for an actual property called "theChangingProperty". But I want that to be an array that will spit out the actual property that would change with each loop iteration (name, title, number, property4, etc)
Thanks for your time in answering a newbie question :)