Re: Rotate a standard Cocoa control?
Re: Rotate a standard Cocoa control?
- Subject: Re: Rotate a standard Cocoa control?
- From: Graham Cox <email@hidden>
- Date: Mon, 11 May 2015 09:29:41 +1000
> On 10 May 2015, at 2:38 pm, Steve Mills <email@hidden> wrote:
>
> On May 9, 2015, at 23:20:08, Graham Cox <email@hidden> wrote:
>>
>> Me too, which is why it does :)
>
> Heh, I didn’t notice that before. One thing I’d suggest: When the knob is set to stop on tick marks, the scroll event should take it immediately to the next/prev tick instead of waiting for the float value to get close enough to the next tick value.
Yes, that might be better. As it is I have to keep track of the “unquantised” value so that the scrollwheel can accumulate until it hits the next threshold. The only reason I did it that way is so that the handling of snapping to tick marks works no matter where the events come from that change the value - in other words I don’t need to do extra work in the scroll wheel handler. But it might be better to do it the way you suggest.
> I also found it a bit disconcerting that the inc/dec action was dependent on whether you mouseDown’d on the left or right side. I usually just aim for the center, then click and drag, so that would make upward drags increase sometimes and decrease other times. I kinda expect an upward drag to always increase, because at this point, where a vertical drag will rotate a knob, we’ve gone beyond trying to simulate a real-world action that’s easier done with fingers, and instead going with an action that’s easier to do with the mouse. Know what I mean?
Yes, I do. My thinking was that if you were to try a similar gesture on a real physical knob of this type, that’s how it would work - your finger would drive the knob according to which side you pushed on. I found this quite usable with a mouse where you can be very precise with where you click, but I haven’t tried it from a trackpad where it might be more troublesome. Just goes to show there’s more than one way to skin a cat, etc. Still, have source, can edit. I guess the real problem is there is no consistency between implementations of this kind of control, because everyone’s forced to write their own and each one does it a little differently according to the programmer’s own biases. If there were a consensus, I’d happily align myself with it.
—Graham
_______________________________________________
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