Re: Self describing NSObjects.

2015-02-05 Thread Shazron
Similar to Seth's method: https://github.com/phonegap/adobe-creative-sdk-foundation/blob/master/src/ios/NSObject%2BPropertiesAsDictionary.m Then you could serialize the dictionary to a JSON string, and print that. On Thu, Feb 5, 2015 at 3:54 PM, Seth Willits wrote: > On Feb 4, 2015, at 10:43 AM,

Re: Self describing NSObjects.

2015-02-05 Thread Seth Willits
On Feb 5, 2015, at 3:54 PM, Seth Willits wrote: >> How would you think about implementing this? It seems like I run into this >> need year after year after year. > > > NSString * NSObjectDescriptionUsingProperties(id obj) > { > unsigned int propCount; > objc_property_t * propList

Re: Self describing NSObjects.

2015-02-05 Thread Seth Willits
On Feb 4, 2015, at 10:43 AM, Alex Zavatone wrote: > > How would you think about implementing this? It seems like I run into this > need year after year after year. NSString * NSObjectDescriptionUsingProperties(id obj) { unsigned int propCount; objc_property_t * propList = clas

Re: Self describing NSObjects.

2015-02-04 Thread Graham Cox
> On 5 Feb 2015, at 3:38 pm, Richard Heard wrote: > > Or you can call _ivarDescription on the object in question. > -R iOS only, apparently - doesn't seem to exist on Mac. And it's undocumented, unlike the runtime functions. --Graham ___ Cocoa-

Re: Self describing NSObjects.

2015-02-04 Thread Richard Heard
Or you can call _ivarDescription on the object in question. -R > On 4 Feb 2015, at 10:54:49 AM, Pascal J. Bourguignon > wrote: > > >> On 04 Feb 2015, at 19:43, Alex Zavatone wrote: >> >> All too often, I have a simple data class that is just a bunch of properties >> of cocoa collections. >>

Re: Self describing NSObjects.

2015-02-04 Thread Pascal J. Bourguignon
> On 04 Feb 2015, at 19:43, Alex Zavatone wrote: > > 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 th

Self describing NSObjects.

2015-02-04 Thread Alex Zavatone
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. C