• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Issues with NSWindowDelegate on multiple Mac OS X platforms
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issues with NSWindowDelegate on multiple Mac OS X platforms


  • Subject: Re: Issues with NSWindowDelegate on multiple Mac OS X platforms
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Wed, 7 Oct 2009 08:23:58 +0200


Le 7 oct. 2009 à 06:42, Kyle Sluder a écrit :

Please read the 10.6 Foundation release notes, particularly the
section entitled "Formal protocol adoption":
http://developer.apple.com/mac/library/releasenotes/Cocoa/Foundation.html

We compile dual-mode code using the following:

@interface Subclass : Superclass
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
<ConformingProtocol>
#endif

In the case of conformance to multiple protocols, some of which are
unavailable pre-10.6, we use this:

@interface Subclass : Superclass <Protocol1
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
,Protocol2
#endif


It's a mess, but it works, and the benefit of static type checking far outweighs the cost. (And it also motivates you to drop 10.5 support. :D)

--Kyle Sluder


That's the way to go, but MAC_OS_X_VERSION_10_6 is not defined on 10.5 SDK.

So you have to add another couple of line at the top of the file (or in a prefix header):

#ifndef MAC_OS_X_VERSION_10_6
#define MAC_OS_X_VERSION_10_6 1060
#endif

-- Jean-Daniel




_______________________________________________

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


  • Follow-Ups:
    • Re: Issues with NSWindowDelegate on multiple Mac OS X platforms
      • From: Kyle Sluder <email@hidden>
References: 
 >Issues with NSWindowDelegate on multiple Mac OS X platforms (From: Tron Thomas <email@hidden>)
 >Re: Issues with NSWindowDelegate on multiple Mac OS X platforms (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Suggest reasons for this crash?
  • Next by Date: Re: app delegate +initialize
  • Previous by thread: Re: Issues with NSWindowDelegate on multiple Mac OS X platforms
  • Next by thread: Re: Issues with NSWindowDelegate on multiple Mac OS X platforms
  • Index(es):
    • Date
    • Thread