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 protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]