• 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: NSStringFromClass versus className ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSStringFromClass versus className ?


  • Subject: Re: NSStringFromClass versus className ?
  • From: "Kyle Sluder" <email@hidden>
  • Date: Thu, 28 Feb 2008 02:46:55 -0500

On Wed, Feb 27, 2008 at 7:17 AM, Mike Abdullah
<email@hidden> wrote:
> Right, clearly you should use that for testing a class. But, what if
>  you want to record the classname so you can instantiate another one or
>  similar later?

The comment wasn't really directed at you, it was kind of an
augmentation of your point.  Object comparisons are more common than
logging operations; one might assume upon seeing NSStringFromClass()
that they could perform a string comparison to determine if an object
is of their desired class, and this doesn't work for subclasses and
will lead to head-scratching if the object is being KVO observed and
has thus been isa-swizzled.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSStringFromClass versus className ? (From: Dave Jewell <email@hidden>)
 >Re: NSStringFromClass versus className ? (From: glenn andreas <email@hidden>)
 >Re: NSStringFromClass versus className ? (From: Dave Jewell <email@hidden>)
 >Re: NSStringFromClass versus className ? (From: Mike Abdullah <email@hidden>)
 >Re: NSStringFromClass versus className ? (From: "Kyle Sluder" <email@hidden>)
 >Re: NSStringFromClass versus className ? (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Other application's window resize
  • Next by Date: Re: Spotlight Importer
  • Previous by thread: Re: NSStringFromClass versus className ?
  • Next by thread: Problems with CAConstraint
  • Index(es):
    • Date
    • Thread