Re: Implementing Full Screen for 10.7 but app should also run on 10.6
Re: Implementing Full Screen for 10.7 but app should also run on 10.6
- Subject: Re: Implementing Full Screen for 10.7 but app should also run on 10.6
- From: Quincey Morris <email@hidden>
- Date: Wed, 16 Nov 2011 01:48:33 -0800
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 do (and did) understand this point. However, it is not (for example) impossible that a later OS version may expect a different constant, and either check the executable for being linked against certain SDK versions, or treat the "old" value in some kind of compatibility mode. Under such scenarios, a change of constant value could be accommodated.
Of course, this sort of thing would be unlikely in such a simplistic case as a single constant value, but the underlying point remains valid. It's just not safe to define your own SDK (or even fragment of an SDK). Of course, developers do it; that doesn't make it safe.
> That is a practice I consider just as dangerous. It is very easy to end up using APIs that are newer than your minimum supported version and forgetting to add the run-time check. Mac OS will allow you to run that application on lower OS versions, but at best it will not behave as intended, but it is also quite likely to crash.
Yes, it's easy to make a mistake, and there's no compile-time safety net, as I already acknowledged. Nevertheless, this is the technically correct way to do it.
_______________________________________________
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