• 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: The best way to call Cocoa methods not implemented in previous versions of the SDK?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The best way to call Cocoa methods not implemented in previous versions of the SDK?


  • Subject: Re: The best way to call Cocoa methods not implemented in previous versions of the SDK?
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 06 Sep 2011 10:43:01 -0700

On Sep 6, 2011, at 03:33 , Oleg Krupnov wrote:

> I'm implementing a new Lion's API, namely the resume. I need to make
> the following call:
>
> [window setRestorationClass:someClass];
>
> I'd like my app to also work on Snow Leopard, so I do this:
>
> if ([window respondsToSelector:@selector(setRestorationClass:)])
> {
> [window setRestorationClass:someClass];
> }
>
> however, because I compile for Snow Leopard, the compiler will still
> give me a warning that the setRestorationClass: method is not defined.

Wait, what SDK are you compiling against? 10.6? I'm assuming so, since presumably you wouldn't get a *compiler* error if you were compiling against the 10.7 SDK.

If so, that sounds like a terrible idea. It forces you to write your own "fake" (subset of the) 10.7 SDK, which is a terrible idea (and probably not supported), and it links your app agains the 10.6 libraries, which is a terrible idea (in relation to its 10.7 behavior).


_______________________________________________

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: The best way to call Cocoa methods not implemented in previous versions of the SDK?
      • From: Jens Alfke <email@hidden>
References: 
 >The best way to call Cocoa methods not implemented in previous versions of the SDK? (From: Oleg Krupnov <email@hidden>)

  • Prev by Date: Re: nonatomic vs atomic assign/retain
  • Next by Date: Re: using AppKit additions in background threads
  • Previous by thread: Re: The best way to call Cocoa methods not implemented in previous versions of the SDK?
  • Next by thread: Re: The best way to call Cocoa methods not implemented in previous versions of the SDK?
  • Index(es):
    • Date
    • Thread