Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-16 Thread Quincey Morris
On Nov 16, 2011, at 01:08 , Stefan Werner wrote: Any application compiled today will have a constant number in place of NSWindowCollectionBehaviorFullScreenPrimary. If the OS at some point changes the meaning of that number, it will break all applications compiled before that date. Yes, I

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-16 Thread Stefan Werner
On 14.11.2011, at 19:20, Quincey Morris wrote: Don't follow the advice to define NSWindowCollectionBehaviorFullScreenPrimary yourself. It's really, really dangerous to replicate a fragment of one SDK in a build against an earlier SDK. What if the value changes in a later 10.7.x SDK, or if

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-16 Thread glenn andreas
On Nov 16, 2011, at 3:08 AM, Stefan Werner wrote: On 14.11.2011, at 19:20, Quincey Morris wrote: Don't follow the advice to define NSWindowCollectionBehaviorFullScreenPrimary yourself. It's really, really dangerous to replicate a fragment of one SDK in a build against an earlier SDK.

Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Koen van der Drift
Another window size question, just putting it ina another thread. I'd like my application to use the full screen feature on 10.7, but the app should also run on 10.6 I tried adding NSWindowCollectionBehaviorFullScreenPrimary for my main window, but got an error since I am building agains 10.6

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Richard Somers
Do something like this. - (void)prepareWindowCollectionBehavior { if (MySystemVersion_10_07_OrLater()) { #ifdef MAC_OS_X_VERSION_10_7 NSWindowCollectionBehavior behavior = [_window collectionBehavior]; behavior = behavior | NSWindowCollectionBehaviorFullScreenPrimary;

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Gideon King
You could do something like this: #ifndef NSAppKitVersionNumber10_6 #define NSAppKitVersionNumber10_6 1038 #endif #ifndef NSWindowCollectionBehaviorFullScreenPrimary #define NSWindowCollectionBehaviorFullScreenPrimary 1 7 #endif if (floor(NSAppKitVersionNumber)

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Kyle Sluder
On Nov 14, 2011, at 7:30 AM, Gideon King gid...@novamind.com wrote: if (floor(NSAppKitVersionNumber) NSAppKitVersionNumber10_6) { This comparison is incorrect. The AppKit version number almost always gets bumped on an OS point release. This comparison will succeed on 10.6.1 and higher.

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Jens Alfke
On Nov 14, 2011, at 7:15 AM, Koen van der Drift wrote: I'd like my application to use the full screen feature on 10.7, but the app should also run on 10.6 I tried adding NSWindowCollectionBehaviorFullScreenPrimary for my main window, but got an error since I am building agains 10.6 SDK. I

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Quincey Morris
On Nov 14, 2011, at 07:15 , Koen van der Drift wrote: I'd like my application to use the full screen feature on 10.7, but the app should also run on 10.6 I tried adding NSWindowCollectionBehaviorFullScreenPrimary for my main window, but got an error since I am building agains 10.6 SDK.

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Koen van der Drift
On Mon, Nov 14, 2011 at 1:20 PM, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Nov 14, 2011, at 07:15 , Koen van der Drift wrote: I'd like my application to use the full screen feature on 10.7, but the app should also run on 10.6  I tried adding

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Gideon King
They have not bumped the appkit version number in 10.6 (see NSApplication.h), and in previous releases, the number was just bumped by a decimal, so the floor() call handles that. As far as I am aware, this comparison should be correct. e.g. #define NSAppKitVersionNumber10_5 949 #define

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Charles Srstka
On Nov 14, 2011, at 11:16 AM, Kyle Sluder wrote: On Nov 14, 2011, at 7:30 AM, Gideon King gid...@novamind.com wrote: if (floor(NSAppKitVersionNumber) NSAppKitVersionNumber10_6) { This comparison is incorrect. The AppKit version number almost always gets bumped on an OS point

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Kyle Sluder
On Mon, Nov 14, 2011 at 1:39 PM, Gideon King gid...@novamind.com wrote: They have not bumped the appkit version number in 10.6 (see NSApplication.h), and in previous releases, the number was just bumped by a decimal, so the floor() call handles that. As far as I am aware, this comparison

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Graham Cox
On 15/11/2011, at 2:15 AM, Koen van der Drift wrote: Another window size question, just putting it ina another thread. I'd like my application to use the full screen feature on 10.7, but the app should also run on 10.6 I tried adding NSWindowCollectionBehaviorFullScreenPrimary for my main

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Koen van der Drift
On Nov 14, 2011, at 4:55 PM, Graham Cox wrote: If you are using Xcode 4.x, you can just flag the supports fullscreen in IB and it just works. You get a warning that the feature isn't supported on 10.6 or earlier when the nib is compiled, but it's OK - earlier systems just ignore that