iterate through object properties and change current property in a loop in objective-c-Collection of common programming errors
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 attributes 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