Re: NSScroller methods not being called
Re: NSScroller methods not being called
- Subject: Re: NSScroller methods not being called
- From: Troy Stephens <email@hidden>
- Date: Fri, 25 Jan 2008 13:24:21 -0800
On Jan 25, 2008, at 10:41 AM, Michael Watson wrote:
I've overridden the following two methods of NSScroller, as per the
docs, to perform custom drawing:
- (void)drawParts
- (void)drawArrow:(NSScrollerArrow)arrow highlight:(BOOL)flag
Neither method is ever called. The -drawKnob method is indeed
called, but those two are not. What have I missed, exactly?
Hi Michael,
The above methods are holdovers from the OpenStep API and aren't
actually used on Mac OS X; they were obsoleted in the transition to
the Aqua scroller appearance in 10.0. The reference documentation on
them is out of date. (I'm filing a bug to get that fixed.)
If you need to do custom scroller drawing, overriding one or more of:
- (void)drawRect:(NSRect)rect;
- (void)drawKnob;
- (void)drawKnobSlotInRect:(NSRect)slotRect highlight:(BOOL)flag;
- (void)highlight:(BOOL)flag;
is the way to go.
Sorry for the confusion.
--
Troy Stephens
Cocoa Frameworks
Apple, Inc.
_______________________________________________
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