• 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
Re: find what type of object a variable belongs to
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Re: find what type of object a variable belongs to (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: using zlib on OS X
  • Next by Date: KVO mysql
  • Previous by thread: Re: find what type of object a variable belongs to
  • Next by thread: Re: find what type of object a variable belongs to
  • Index(es):
    • Date
    • Thread