• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to get the value of a NSNumber contained in an array while debugging ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Alex Kac <email@hidden>
  • Date: Sun, 3 Aug 2008 14:44:28 -0500

I'm also fond of simply hovering over the variable and tapping on the popup menu indicator and then clicking "Print Description". Just depends on whether I'm already in the console or not.

On Aug 3, 2008, at 2:00 PM, email@hidden wrote:

Message: 12
Date: Sun, 3 Aug 2008 11:55:50 -0700
From: Jens Alfke <email@hidden>
Subject: Re: How to get the value of a NSNumber contained in an array
	while	debugging ?
To: MAGDELENAT Philippe <email@hidden>
Cc: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset="windows-1252"


On 3 Aug '08, at 11:36 AM, MAGDELENAT Philippe wrote:

	- When I put 10 NSNumber in a NSMutableArray and look at it in the
debugger (displaying the content of the array with the little
arrow), no way to display the value. The formatter seems ignored or
invalid.


Use the gdb command line:

	po myArray

This will call -description on the array and print its contents. It
works with any Cococa collection class. If you only want to see one
object, do:

	po [myArray objectAtIndex: 0]

—Jens

Alex Kac - President and Founder Web Information Solutions, Inc.

"Forgiveness is not an occasional act: it is a permanent attitude."
-- Dr. Martin Luther King




_______________________________________________

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


  • Prev by Date: Re: How to get the value of a NSNumber contained in an array while debugging ?
  • Next by Date: Re: How to get the value of a NSNumber contained in an array while debugging ?
  • Previous by thread: Want to save the content of a NSView with CALayer embedded.
  • Next by thread: Re: How to get the value of a NSNumber contained in an array while debugging ?
  • Index(es):
    • Date
    • Thread