using new APIs with old OS versions
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