• 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: Wed, 20 Feb 2008 18:37:28 -0500

On Wed, Feb 20, 2008 at 1:23 PM, Mike Abdullah
<email@hidden> wrote:
>  With this I suspect that NSStringFromClass() will return the dynamic
>  class name which will be different to what your code might expect. -
>  className I believe will still return your object's intended class.

Regardless of whether or not this is the case, keep in mind that you
should always be testing for object class using the NSObject protocol
methods -isKindOfClass: (allows for inheritance) and -isMemberOfClass:
(strict test).

--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

  • Follow-Ups:
    • Re: NSStringFromClass versus className ?
      • From: Mike Abdullah <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>)

  • Prev by Date: Re: Problems with CAConstraint
  • Next by Date: Re: How to draw a CGImage object to a NSView?
  • Previous by thread: Re: NSStringFromClass versus className ?
  • Next by thread: Re: NSStringFromClass versus className ?
  • Index(es):
    • Date
    • Thread