Re: Cocoa methods in Expressions window
Re: Cocoa methods in Expressions window
- Subject: Re: Cocoa methods in Expressions window
- From: Timothy Collett <email@hidden>
- Date: Tue, 16 Oct 2007 13:35:02 -0400
On Oct 16, 2007, at 10:18 AM, Jean-Daniel Dupas wrote:
To obtains the result of an expression in the Expression Window,
you have to cast a function/method to its proper return type:
For example (int)getpid() or (NSString *)[myarray objectAtIndex:1]
If you don't know what you array contains, you can always cast it
into 'id', but you will only be able to inspect the isa pointer
(that enought to know the class name of the returned object).
Huh. That really does work; thanks!
I had looked at the documentation you point to, but I was thrown by
the fact that the Expression window says it's "out of scope", rather
than something like "unknown variable type"...not exactly the most
intuitive error message.
Anyway, thanks a lot! That will be extremely useful.
Timothy Collett
--
"Nothing takes the taste out of peanut butter quite like unrequited
love."
--Charlie Brown
_______________________________________________
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