• 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: Question about Deprecated Methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about Deprecated Methods


  • Subject: Re: Question about Deprecated Methods
  • From: Gregory Weston <email@hidden>
  • Date: Sat, 27 Mar 2004 12:39:09 -0500

On Mar 27, 2004, at 12:30 PM, Charles Srstka wrote:

On Mar 27, 2004, at 6:37 AM, Gregory Weston wrote:

On Mar 27, 2004, at 12:14 AM, Charles Srstka wrote:

but frankly, I just continue to use selectedRowEnumerator. Having to
use the above construct every time you wanted to access the selected
item(s) in a table view would be a pain. And besides, can Apple really
remove those methods? They would break so much software by doing so
that it's not even silly. If they do, it will be a very, very long time
before they are able to do so. When I write an app that has 10.3 as the
minimum requirement, then and only then will I use these new methods.

Bad strategy, unless you fully expect that your software doesn't have a particularly long usable lifespan. The point of deprecating methods is to give fair warning that at some point in the future they _will_ go away, so that by the time that happens they won't be breaking any software that gets even cursory maintenance. Not today. Probably not with 10.4. But if you get caught scrambling to fix half a dozen programs in November 2005 you'll have only yourself to blame. And so will your users.

Well maybe in November 2005 I won't have so many users still on 10.2.x who will have my head if I drop support for their OS, as everyone will be using 10.5 and 10.2 will be as ancient as 10.0 is now. As it is, I tried to drop 10.1 support a while ago and a bunch of them complained, so I had to re-introduce support for it as well.

But it's not necessary to drop support for an older version of the OS just because some of the library calls are not available on newer versions. Ten years ago, there was software that took great advantage of System 7 while still running on System 4.1, and it's certainly not harder to deal with that degree of legacy support with Cocoa than it was with the Toolbox.

I should hope that Apple would get around to removing some ancient methods that were deprecated even in 10.1, IIRC, and which I doubt anyone still uses like -[NSApplication runModalForWindow:relativeToWindow:] before they remove a method like selectedRowEnumerator which *any* app developed under 10.2 or lower which has a table view in it is going to be using.

Many, maybe, but I never used it in any of the (admittedly few) situations where I used a table view.

So at present my options are either to break support for 10.2 and lower and anger many of my users or severely ugly my code up with lots of AppKit version checking. On second thought, I guess I could define my own selectedRowEnumerator method on my NSTableView subclass that calls super's implementation in 10.2 and lower and converts the NSIndexSet to an enumerator of NSNumbers in 10.3 and higher, that would probably be okay. Hmm...

I'd say that's on the right track. Abstraction is a generally a good thing.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: Question about Deprecated Methods (From: Gregory Weston <email@hidden>)
 >Re: Question about Deprecated Methods (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: Question about Deprecated Methods
  • Next by Date: NSTableView tooltips
  • Previous by thread: Re: Question about Deprecated Methods
  • Next by thread: Split Views
  • Index(es):
    • Date
    • Thread