Re: Using deprecated methods
Re: Using deprecated methods
- Subject: Re: Using deprecated methods
- From: Scott Anguish <email@hidden>
- Date: Sun, 6 Jul 2008 00:41:19 -0400
On Jul 6, 2008, at 12:25 AM, James Merkel wrote:
On Sat, 5 Jul 2008 05:08:45 -0700 (PDT) Keith Blount wrote:
Hi,
Something that has bothered me for ages in Cocoa, but which I've
always put to one side, is how to handle certain deprecated methods
when supporting more than one OS. In some instances it's as simple
as checking at runtime which OS is being used and using the
appropriate method accordingly, but I'm wondering here about the
trickier instances. For instance:
I am currently overhauling printing in my application. I have a
page layout accessory view and I now also want to add a print panel
accessory view. My app runs on both Tiger and Leopard. -
setAccessoryView: works on both Tiger and Leopard, for adding an
accessory view to both NSPageLayout and NSPrintPanel. However, in
both cases, -setAccessoryView: was (rather frustratingly in this
case, I feel, as it worked fine) informally deprecated on Leopard.
Instead, we are advised to use -addAccessoryViewController:, which
uses an NSViewController. ...
This brings up another question. Is -setAccessoryView: deprecated
across the board or just for NSPageLayout and NSPrintPanel? I just
added an accessory view to an NSSavePanel. There wasn't anything in
the NSSavePanel docs that said -setAccessoryView: was deprecated
there.
Deprecation is noted in the reference for a particular class. A
deprecation such as this one will only be relevant to that class, and
subclasses.
So, no, it isn't deprecated.
_______________________________________________
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