• 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: Newbie: NSString and debugging question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: NSString and debugging question


  • Subject: Re: Newbie: NSString and debugging question
  • From: email@hidden
  • Date: Wed, 16 Apr 2003 20:16:55 -0700

How do you make "po" give you the "description? In more recent project builder versions, when I use po on structures like NSArray, I get something like this:

(gdb) po self
<NSCFArray 0x29a1070>(
<NSCFDictionary 0x2998730>{
entry = <A HREF="/Name?Broderick,+Matthew">Matthew Broderick</A>;
}

)

But if I use description explicitly, I get this:

(gdb) po [self description]
({entry = "<A HREF=\"/Name?Broderick,+Matthew\">Matthew Broderick</A>"; })
(gdb)



I *never* want the first option, and it's a hassle to type in the second way. So is there a magic way to have 'description' sent with each po?

Dan



On Friday, April 11, 2003, at 03:15 PM, John C. Randolph wrote:

On Thursday, April 10, 2003, at 04:56 PM, Marco Binder wrote:

In debug mode, you can enter "po yourVariableName" to see the contents of any variable within the current scope.

To be precise, "po" (the "print object" command), sends -description to the object in question, and shows the contents of the returned string on the GDB console. IOW, it only works for objects, not for other types.

-jcr

John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.



--
Dan Wood
Karelia Software, LLC
email@hidden
http://www.karelia.com/
Watson for Mac OS X: http://www.karelia.com/watson/

The Arrogance of Power: <http://www.fatdawg.com/senbyrd.html>

To announce that there must be no criticism of the president, or that we are to stand by the president, right or wrong,is not only unpatriotic and servile, but is morally treasonable to the American public.
-- Theodore Roosevelt _______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Newbie: NSString and debugging question
      • From: "John C. Randolph" <email@hidden>
References: 
 >Re: Newbie: NSString and debugging question (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: Re: NSURL vs NSFileManager
  • Next by Date: Re: Newbie NSTableView How to get Multicolor Table Cells an Image s
  • Previous by thread: Re: Newbie: NSString and debugging question
  • Next by thread: Re: Newbie: NSString and debugging question
  • Index(es):
    • Date
    • Thread