NSSliderCell setContinous in NSOutlineView?
NSSliderCell setContinous in NSOutlineView?
- Subject: NSSliderCell setContinous in NSOutlineView?
- From: nick briggs <email@hidden>
- Date: Thu, 2 Dec 2004 13:42:53 +0000
<x-tad-smaller>Hi
I am adding a NSSliderCell to an NSOutlineView. I require that the slider continuously sends its message as it tracks the mouse. Thus I am using:
[sliderCell setContinuous:</x-tad-smaller><x-tad-smaller>YES</x-tad-smaller><x-tad-smaller>]
and
- </x-tad-smaller><x-tad-smaller>(</x-tad-smaller><x-tad-smaller>void</x-tad-smaller><x-tad-smaller>)outlineView:(NSOutlineView *)ov setObjectValue:(</x-tad-smaller><x-tad-smaller>id</x-tad-smaller><x-tad-smaller>)object forTableColumn:(NSTableColumn *)tableColumn byItem:(</x-tad-smaller><x-tad-smaller>id</x-tad-smaller><x-tad-smaller>)item
</x-tad-smaller><x-tad-smaller>
This delegate method is only getting the message when the mouse is released. My code look like this:</x-tad-smaller><x-tad-smaller>
</x-tad-smaller><x-tad-smaller>
</x-tad-smaller><x-tad-smaller>NSSliderCell *sliderCell;
sliderCell = [[[NSSliderCell alloc] init]autorelease];
[sliderCell setMinValue:</x-tad-smaller><x-tad-smaller>0.0</x-tad-smaller><x-tad-smaller>];
[sliderCell setMaxValue:</x-tad-smaller><x-tad-smaller>1.0</x-tad-smaller><x-tad-smaller>];
[sliderCell setContinuous:</x-tad-smaller><x-tad-smaller>YES</x-tad-smaller><x-tad-smaller>]; </x-tad-smaller><x-tad-smaller>// not working</x-tad-smaller><x-tad-smaller>
[[_outlineView tableColumnWithIdentifier:my_identifier] setDataCell:sliderCell];
As a hack I have also tried:
</x-tad-smaller><x-tad-smaller>[sliderCell setAction:my_selector];
This time the selector is called continously but only returns the value of the </x-tad-smaller><x-tad-smaller>sliderCell when the mouse was last released. Besides there should be no reason to use this approach as </x-tad-smaller><x-tad-smaller>setObjectValue should work, right?
Any ideas?
Nick</x-tad-smaller> _______________________________________________
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