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

Re: [sc-users] Knob / JKnob mouseDownAction?



It does work with SwingOSC - thanks!!
btw, is there a way to access the Knob object that the action is added
to in the function?

the first argument in the function accesses the UserView

(
w = GUI.window.new("Knob", Rect(640,630,270,70)).front;
k = Knob.new(w, Rect(20, 10, 32, 32));
)

k.action_({|v,x,y,m| v.value.postln; });

f = {|x, y, z| [x, y, z].postln};

k.addAction(f, \mouseDownAction)

cheers,
martin

On Tue, Dec 30, 2008 at 5:21 PM, blackrain <blackrain.sc@xxxxxxxxx> wrote:
> place this in your extensions.
> there is a small example included at the bottom of the file.
> no clue if this work on swing tho.
>
> cheers,
>
> x
>
> On Tue, Dec 30, 2008 at 8:45 AM, Martin . <blindmanonacid@xxxxxxxxx> wrote:
>> Hello,
>>
>> Is adding more mouseDownActions to a Knob possible without overwriting
>> it's essential functions?
>>
>> cheers,
>> martin
>>
>> _______________________________________________
>> sc-users mailing list
>>
>> info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
>> archive: https://listarc.bham.ac.uk/marchives/sc-users/
>> search: https://listarc.bham.ac.uk/lists/sc-users/search/
>>
>

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/