Re: Leopard-specific functionality in non–Leopard-only project
Re: Leopard-specific functionality in non–Leopard-only project
- Subject: Re: Leopard-specific functionality in non–Leopard-only project
- From: Mike Abdullah <email@hidden>
- Date: Sat, 21 Jun 2008 21:56:15 +0100
If you're desperate to stick with the 10.4 SDK, I'd suggest the best
approach is just to create your own header that mimics the method. So
you'd end up with something like:
@interface NSWindow (LeopardOnlyMethods)
- (void)setCollectionBehavior:(int)behavior;
@end
...
[window setCollectionBehavior:1];
Mike.
On 21 Jun 2008, at 20:51, Jacob Bandes-Storch wrote:
I'm working on a project (with another developer) that will target
OSes older than 10.5, and I'd like to use the Leopard-only NSWindow
method -setCollectionBehavior:. As far as I know, the best way to do
this is to check for the method using -respondsToSelector:. I need
to use the enum type NSWindowCollectionBehavior. When I try this, I
get an error saying "error:
'NSWindowCollectionBehaviorCanJoinAllSpaces' undeclared (first use
in this function)" and a warning "warning: 'NSWindow' may not
respond to '-setCollectionBehavior:'". This is because I'm using the
10.4 SDK... I've read in some places to set the "Cross-develop using
target SDK" setting of the project to 10.5, but that setting is not
available in the General tab of the project info. Does anyone know
how to do this properly without angering the compiler?
_______________________________________________
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
_______________________________________________
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