Re: How to get the value of a NSNumber contained in an array while debugging ?
Re: How to get the value of a NSNumber contained in an array while debugging ?
- Subject: Re: How to get the value of a NSNumber contained in an array while debugging ?
- From: "Sean McBride" <email@hidden>
- Date: Mon, 4 Aug 2008 16:06:58 -0400
- Organization: Rogue Research
On 8/3/08 3:01 PM, Kyle Sluder said:
>> If your array is called myArray, type
>>
>> po myArray
>>
>> in the debugger, and it will print the value of all objects in the array.
>
>More specifically, it will send -description to all the objects in the
>array, and print the result. Useful even if you have an array of your
>own objects and need to inspect them in the debugger; override
>-description and return a meaningful string.
Actually, according to:
<http://developer.apple.com/technotes/tn2004/tn2124.html>
"print-object actually calls the debugDescription method of the
specified object. NSObject implements this method by calling through to
the description method. Thus, by default, an object's debug description
is the same as its description. However, you can override
debugDescription if you want to decouple these; many Cocoa objects do this."
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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