• 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
using new APIs with old OS versions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using new APIs with old OS versions


  • Subject: using new APIs with old OS versions
  • From: Bob Clark <email@hidden>
  • Date: Sun, 23 Jul 2006 14:20:55 -0700

I've got a subclass of NSLevelIndicatorCell that I use when I'm on Tiger and later. If I'm on Panther or earlier I subclass NSCell and make do with a (not-as-nice-looking) version.

(NSLevelIndicatorCell was introduced in Tiger.)

But it's not launching on Panther -- it seems as though even though I don't use NSLevelIndicatorCell on Panther, the run-time linking on Panther sees that "something" in my application is referring to NSLevelIndicatorCell and it fails to launch.

My .h file looks something like this:

@interface CustomCellTiger : NSLevelIndicatorCell
{
    // custom stuff
}
@end

@interface CustomCellPanther : NSCell
{
    // custom stuff
}
@end

Then in the code when I need to instantiate one of my custom cells, I use Gestalt to check for what OS version I'm running, and if it's Tiger or later I'll create a CustomCellTiger and if it's Panther or earlier I'll create a CustomCellPanther.

Is there an approach that will not preemptively abort launch on Panther? The only approach I can think of (aside from abandoning my attempt to subclass from NSLevelIndicatorCell) is to have the CustomCellTiger definition and implementation in a separate NSBundle, which is only loaded under Tiger. But man, that feels like a lot of effort just to salvage the small-and-shrinking Panther user base.

--Bob
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: using new APIs with old OS versions
      • From: Jerry Krinock <email@hidden>
    • Re: using new APIs with old OS versions
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Re: Found a bug in Cocoa: where should I report it?
  • Next by Date: Re: using new APIs with old OS versions
  • Previous by thread: Trivial NSTreeController bug: removing leaf nodes with no siblings?
  • Next by thread: Re: using new APIs with old OS versions
  • Index(es):
    • Date
    • Thread