[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] EZSlider mapping drags

I tend to think that users might be confused or startled by full error messages resulting from GUI actions. So, if there's a good chance of an error (say, by somebody dragging the wrong kind of object in), I prefer to wrap the action in a try block and, if needed, present a user friendly warning rather than a panic inducing error.

sliderView.receiveDragHandler = { arg slider;
try { slider.valueAction = controlSpec.unmap(SCView.currentDrag) }
{ |error|
if(error.notNil) { "Cannot drag \"%\" into EZSlider."

Also, maybe I missed something, but if you start dragging when the mouse is inside a slider view, isn't it supposed to invoke the slider's action? Which is...

sliderView.action = "">
value = controlSpec.map(sliderView.value);
numberView.value = value.round(round);

What functionality does the slider drag action add?

On Dec 3, 2007, at 1:01 AM, blackrain wrote:

Hi all, the following small addition maps drags to and from controls
in EZSlider.
can please someone add this?

SCViews2.sc @ 177

sliderView.receiveDragHandler = { arg slider;
slider.valueAction = controlSpec.unmap(SCView.currentDrag);

sliderView.beginDragAction = { arg slider;


Sc-devel mailing list

: H. James Harkins

: jamshark70@xxxxxxxxxxxxxxxxx

: http://www.dewdrop-world.net


"Come said the Muse,

Sing me a song no poet has yet chanted,

Sing me the universal."  -- Whitman