• 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: Using deprecated methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using deprecated methods


  • Subject: Re: Using deprecated methods
  • From: Uli Kusterer <email@hidden>
  • Date: Sat, 5 Jul 2008 17:43:02 +0200

On 05.07.2008, at 15:17, David Duncan wrote:
To handle a case like this, you are going to have to create a bundle that you link against the 10.5 SDK and only load there. This bundle will contain your NSViewController subclass and allow you to conditionally call -setAccessoryView: on 10.4 and - addAccessoryViewController: on 10.5. This is a general pattern that you can use when you want to provide alternate functionality where it is a requirement to subclass and that subclass only exists on a newer version of the OS.


Or rather, you'll want to do this in a more OO approach, i.e. abstract your custom print panel stuff away into a class. The base class is linked into your app, and the loadable bundles implement subclasses of these. Your app simply uses these classes, and they take care of using view controllers etc. as needed.

You'd just load the appropriate bundle and instantiate its main class, then hand it the appropriate views or whatever makes sense.

Alternately, you could also implement your own version of NSViewController and the viewcontroller-based accessory view methods, and just load them on 10.4 to provide backwards compatibility, while your code can effectively assume it always uses the 10.5 APIs.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de





_______________________________________________

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: Using deprecated methods
      • From: Charles Srstka <email@hidden>
References: 
 >Using deprecated methods (From: Keith Blount <email@hidden>)
 >Re: Using deprecated methods (From: David Duncan <email@hidden>)

  • Prev by Date: command line arguments with NSWorkspace openFile
  • Next by Date: Re: c++ exceptions in objective c call stack
  • Previous by thread: Re: Using deprecated methods
  • Next by thread: Re: Using deprecated methods
  • Index(es):
    • Date
    • Thread