Re: Do I know whether a NSNumber was created with +numberWithBool rather than a different +numberWithxx method?
Re: Do I know whether a NSNumber was created with +numberWithBool rather than a different +numberWithxx method?
- Subject: Re: Do I know whether a NSNumber was created with +numberWithBool rather than a different +numberWithxx method?
- From: Gus Mueller <email@hidden>
- Date: Wed, 1 Feb 2006 23:42:55 -0800
On Feb 1, 2006, at 10:29 PM, email@hidden wrote:
I am walking through a NSDictionary and have a variety of NSNumber
objects. Some where created with +numberWithBool: and others were
created with +numberWithInt:
Do I have any way to know whether that NSNumber represents a BOOL
rather than an int?
I _think_ you can look at NSNumber's objCType.
It returns "f" for floats, "d" for doubles, "i" for integers (and
longs), and "c" for booleans.
-gus
--
August 'Gus' Mueller
Flying Meat Inc.
http://flyingmeat.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