Re: NSSegmentedControl Display Bug?
Re: NSSegmentedControl Display Bug?
- Subject: Re: NSSegmentedControl Display Bug?
- From: Philip Dow <email@hidden>
- Date: Wed, 3 Aug 2005 22:25:15 +0200
Todd,
This bit of code works great on 10.4.2, but on a 10.3.9 system it
crashes:
2005-08-01 13:38:02.685 Journler[371] *** -[NSSegmentedCell
_setSegmentedCellStyle:]: selector not recognized
2005-08-01 13:38:02.686 Journler[371] An uncaught exception was raised
2005-08-01 13:38:02.693 Journler[371] *** -[NSSegmentedCell
_setSegmentedCellStyle:]: selector not recognized
2005-08-01 13:38:02.693 Journler[371] *** Uncaught exception:
<NSInvalidArgumentException> *** -[NSSegmentedCell
_setSegmentedCellStyle:]: selector not recognized
Do you know what's up?
-Phil
http://phildow.net
Am 31.07.2005 um 21:53 schrieb Todd Yandell:
Hi,
I had to get around this bug for one of my projects, too. I did it
with a subclass of NSSegmentedControl and a private cell method. I
also filed a bug report on it almost two months ago: <rdar://
4139593>. Anyway, here's how I did it:
#define NormalSegmentedCellStyle 1
#define FlatSegmentedCellStyle 2
@interface AOSegmentedControl : NSSegmentedControl
{
}
@end
@interface NSSegmentedCell ( PrivateMethod )
- (void)_setSegmentedCellStyle:(int)style;
@end
@implementation AOSegmentedControl
- (void)awakeFromNib
{
[self setFrameSize:NSMakeSize([self frame].size.width, 26)];
}
- (NSCell *)cell
{
NSSegmentedCell *cell = [super cell];
[cell _setSegmentedCellStyle:FlatSegmentedCellStyle];
return cell;
}
@end
_______________________________________________
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
_______________________________________________
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