Re: Viewing array elements in Project Builder
Re: Viewing array elements in Project Builder
- Subject: Re: Viewing array elements in Project Builder
- From: Jonathan Jackel <email@hidden>
- Date: Tue, 21 May 2002 10:53:00 -0400
Presumably the objects in the array are instances of your own subclasses.
If so, write a description method that returns an NSString. If you need to
examine several instance variables for debugging, construct a formatted
string with those variables.
The description method for your objects will be called when you print the
array description in the console.
See the NSObject protocol docs (not the NSObject class docs).
Jonathan
Write a description method on 5/21/02 10:09 AM, zauhar at email@hidden
wrote:
>
This has gotta be a FAQ, but I can't find it.
>
>
(Yes, I know I could have always looked harder...)
>
>
While debugging in a project builder, I would like to "open" an NSArray,
>
and be able to examine the individual objects it points to (like you
>
can in CodeWarrior). Printing a description to console does indeed show
>
me that all the objects are there, but I can't examine them
>
individually - I just see the addresses. Using print-object from the gdb
>
prompt doesn't give me any more information (just announces the class of
>
the object, no information as to the data items that make up the object).
>
>
Any advice would be appreciated.
>
>
Thanks,
>
>
Randy
>
>
Randy J. Zauhar, PhD
>
Assoc. Prof. of Biochemistry
>
Director, Graduate Program in Bioinformatics
>
Dept. of Chemistry & Biochemistry
>
University of the Sciences in Philadelphia
>
600 S. 43rd Street
>
Philadelphia, PA 19104
>
>
Phone: (215)596-8691
>
FAX: (215)596-8543
>
E-mail: email@hidden
>
Web: http://tonga.usip.edu/zauhar
>
>
Thought for the ages:
>
>
"If you have conceptions of things that you can have no conception of,
>
then the conception and the thing appear to co-incide." -- C.G. Jung
>
>
Thought for the new millennium:
>
>
"Nothing is gooder than watching cartoons." -- Catherine Zauhar, age 5
>
_______________________________________________
>
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.
_______________________________________________
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.