• 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: Is window a drawer?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is window a drawer?


  • Subject: Re: Is window a drawer?
  • From: Shaun Wexler <email@hidden>
  • Date: Fri, 5 Nov 2004 12:32:21 -0800

On Nov 5, 2004, at 12:07 PM, Matt Gillette wrote:

I know this is nitpicking, but you should use the class method to prevent misspelling and it gives quick notification if the class changed names.

[window isKindOfClass:[NSDrawerWindow class]]

Your "quick notification" will be when your app crashes when it fails to link against AppKit.


On Nov 5, 2004, at 10:17 AM, Shaun Wexler wrote:
[window isKindOfClass:NSClassFromString(@"NSDrawerWindow")]

NSDrawerWindow is a private AppKit class, which requires access to its header, or your own declaration of an interface. Using NSClassFromString() will not break if the private class does not exist, returning Nil, whereas it would crash if you had directly linked against it.
--
Shaun Wexler
MacFOH
http://www.macfoh.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


  • Follow-Ups:
    • Re: Is window a drawer?
      • From: Frank Midgley <email@hidden>
References: 
 >Is window a drawer? (From: Tim Conkling <email@hidden>)
 >Re: Is window a drawer? (From: Shaun Wexler <email@hidden>)
 >Re: Is window a drawer? (From: Matt Gillette <email@hidden>)

  • Prev by Date: Re: Internationalization: How to bring the locale in line
  • Next by Date: Re: Internationalization: How to bring the locale in line
  • Previous by thread: Re: Is window a drawer?
  • Next by thread: Re: Is window a drawer?
  • Index(es):
    • Date
    • Thread