Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
I want to be able to pass an array of variable names to a method which will then run though a loop and display the value of an objects variable I have created in the NSLog.
This is the standard way I have been printing each variable of the object info to NSLog
But as there are 15 of them I didnt want to keep filling up the NSLog with them all. I was thinking that if would be better to just display the ones related to any changes made to them. So I started to make a method that I could pass an array with the names of each variable as a string.
That is another way of doing it. Not all of the objects variables are integers but I'm sure I could get this to work if need be. I was hoping to simply call the objects variables by name and having the code quite simplistic.
Replies
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeLooking into it now. That is another way of doing it. Not all of the objects variables are integers but I'm sure I could get this to work if need be. I was hoping to simply call the objects variables by name and having the code quite simplistic.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomehttp://www.iphonedevsdk.com/forum/iphone-sdk-development/11814-how-retrieve-property-class-using-variable-name.html
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome