Hi,

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.

How do I work around this, other than using [NSObject
performSelector:withObject:...], which looks too cumbersome, and other
than deriving all windows from a base class that will define this
method? Extensions are not suitable either, because there is no way to
call super from them. Any other ideas?

Thanks.
_______________________________________________

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]

Reply via email to