• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Determining the true type from an NSNumber
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Determining the true type from an NSNumber


  • Subject: Determining the true type from an NSNumber
  • From: Francisco Tolmasky <email@hidden>
  • Date: Wed, 1 Jun 2005 15:27:09 -0700

I'm dealing with some NSNumbers in my program, and I would like to know if there is a way to determine if the number contained should be interpreted as a float or an int or etc etc etc. Something like if ([[myNumber activeType] isEqualTo: @"float"]) [myNumber numberWithFloat].

Is this possible? All I can see so far is checking whether the concrete class is NSCFNumber or NSCFBoolean, but that's about it.

Thanks in advance,

Francisco Tolmasky
email@hidden
www-scf.usc.edu/~tolmasky


_______________________________________________ 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
  • Follow-Ups:
    • Re: Determining the true type from an NSNumber
      • From: Pontus Ilbring <email@hidden>
  • Prev by Date: Re: glyphWithName: broken on Tiger ?
  • Next by Date: Re: Searching text
  • Previous by thread: KVC and removeObjectFrom<Key>AtIndex not called if index is out of range
  • Next by thread: Re: Determining the true type from an NSNumber
  • Index(es):
    • Date
    • Thread