Re: Direct use of NSScroller?
Re: Direct use of NSScroller?
- Subject: Re: Direct use of NSScroller?
- From: chaitanya pandit <email@hidden>
- Date: Fri, 3 Oct 2008 03:44:11 +0530
On 02-Oct-08, at 10:09 PM, James W. Walker wrote:
On Oct 1, 2008, at 8:53 PM, Clark Cox wrote:
On Wed, Oct 1, 2008 at 7:13 PM, James Walker
<email@hidden> wrote:
Is it possible to use a scroller without a scroll view? The first
problem
is that IB won't let me create an NSScroller that is not embedded
in an
NSScrollView.
Just instantiate a generic NSView, and set its class to NSScroller.
I guess I could shrink down the NSScrollView so that you only
see the one scroll bar. Then the next problem would be how to set
the
current value. I see the method setFloatValue:knobProportion:,
which I
guess would set the current value. But this method is marked
deprecated in
10.5, with no explanation of why it's deprecated or what one
should do
instead.
It's probably deprecated because it conflates two attributes of the
scroller that are only peripherally related (i.e. the size of the
scroll thumb, and its location). Use -setKnobProportion: and
-setDouleValue: instead.
@interface NSScroller(NSDeprecated)
/* A method that was deprecated in Mac OS 10.5. To maintain binary
compatibility, AppKit will continue to invoke overrides of this
method. Code that targets Mac OS 10.5 and later should use -
setDoubleValue: and -setKnobProportion: instead, and eliminate any
overrides of -setFloatValue:knobProportion:. Code that needs to remain
compatible with Mac OS 10.4 and earlier should continue to use -
setFloatValue:knobProportion:.
*/
- (void)setFloatValue:(float)aFloat knobProportion:(CGFloat)proportion;
@end
Thanks. I guess I had looked at the 10.4 SDK version of
NSScroller.h, which doesn't have -
setKnobProportion:._______________________________________________
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
_______________________________________________
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