Re: using po in debugger Xcode 5.1.1
Re: using po in debugger Xcode 5.1.1
- Subject: Re: using po in debugger Xcode 5.1.1
- From: Owen Hartnett <email@hidden>
- Date: Mon, 19 May 2014 15:49:41 -0400
On May 16, 2014, at 12:31 PM, Fritz Anderson < email@hidden> wrote:
All dictionaries, or only the ones you’ve been trying recently?
A dictionary I'm getting back from [foo JSONvalue], which was originally sent as type id.
I see that -safeObjectForKey: is from an external library. Are you importing it yourself, or getting it second-hand from another library?
Ah, found it. I had written a safeObjectForKey routine in a category on NSDictionary. I would call that so I wouldn't crash if I tried to access the dict with a null key. The failing dictionary was returned from JSON, so was returned as type id, somewhere along the line. I mistakenly wrote it to return a (NSDictionary *) object, instead of id, and po choked on it. Why po would call this routine instead of mine is a mystery, but I'm glad that I can now correctly po my dictionaries.
Thanks for the clue on solving it.
-Owen
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden