Re: find what type of object a variable belongs to
Re: find what type of object a variable belongs to
- Subject: Re: find what type of object a variable belongs to
- From: David Kennedy <email@hidden>
- Date: Sun, 25 Sep 2005 09:07:54 +0100
On 25 Sep 2005, at 02:04, Jerry Krinock wrote:
on 05/09/24 16:56, Aaron Wallis at email@hidden wrote:
I was wondering if there was any way of tracking down what the data
type is during runtime?
for example:
int myInt = 7;
NSString * myString = @"hello world.";
NSLog(@"%@", [ myString isType ]) // logs NSString
NSLog(@"%@", [ myInt isType ]) // logs int
is there a function or method like isType?
Aaron, remember int is not an object, so therefore does not react to
messages,
but for actual object instances...
Yes, it is -class. Ignore the "CF" in the class names when reading
your
log.
David Kennedy (http://www.zenopolis.com)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden