Self describing NSObjects.
Self describing NSObjects.
- Subject: Self describing NSObjects.
- From: Alex Zavatone <email@hidden>
- Date: Wed, 04 Feb 2015 13:43:50 -0500
All too often, I have a simple data class that is just a bunch of properties of cocoa collections.
When walking through the debugger, it would be nice if these classes could auto describe.
Consider this. I have a class with the properties of NSStrings that are firstname, lastname, address.
Calling description or debugDescription on an instance of the class simply prints out the memory location.
Is there something that I'm missing here? I don't want to manually enter each of the names of each of the properties to be exposed through a description method. Is there a means to extend NSObject to auto describe the top level of properties that are NSStrings, NSDictionaries, NSSets and so on and automatically dump them to the console?
How would you think about implementing this? It seems like I run into this need year after year after year.
Thanks.
Alex
Sent from my iPad. Please pardon typos.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden