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: Jerry Krinock <email@hidden>
- Date: Sat, 24 Sep 2005 18:04:19 -0700
- Thread-topic: find what type of object a variable belongs to
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?
Yes, it is -class. Ignore the "CF" in the class names when reading your
log.
_______________________________________________
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