[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-users] drag&drop mystery
- To: sc-users@xxxxxxxxxxxxxxxx
- Subject: [sc-users] drag&drop mystery
- From: "Martin ." <blindmanonacid@xxxxxxxxx>
- Date: Mon, 29 Dec 2008 15:32:38 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=mpuukB/WxEsPqITjuFfSn0sCKHXjtIaNegXZQBKJL9w=; b=F5sECpZRV0dYN5jV+bznQ2R83Ji+kN+MJK34VjwMRAwqv6aSUDZa87jX+84Pw/vfF+ sd7ertUq+cFx6u93gWw5H0TGQ3l61euArVShU2MP2KRCudXP4INh/7G95XFHuJPIjkp8 DBX/hG5aPsDtvOP20/YazP2PGeXVRB6V0dCJI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=ALTZ/1vkCuhQcPBDzdztpZptxRAeJlgW/R2oknPEDIjnZvHGrqilBMPUOsK3nlwStR dOPCq+lEP678Y3PNwWsymo1WN4JcgWItFtsZvPBGvANy0a7QgTplDybkSTHUrrBN6+m5 OtccnkjP40hcvT6lPepaj9I1Z8HPiS9u0BDpM=
- List-id: SuperCollider users mailing list <sc-users.create.ucsb.edu>
- Reply-to: sc-users@xxxxxxxxxxxxxxxx
- Sender: owner-sc-users@xxxxxxxxxxxxxxxx
Hi all,
I got a strange thing happening when trying to access an object
received by a drag & drop. Drop the slider on the button, and then the
button should set the slider, but it only works *sometimes*... It is
however able to access the slider object just fine for getting values.
Im using SwingOSC.
(
f = GUI.window.new;
GUI.slider.new( f, Rect( 10, 10, 100, 120 ))
.beginDragAction_({ |sl| sl });
b= GUI.button.new( f, Rect( 10, 160, 130, 24 ))
.states_( [[ "Drop slider on me" ], ["Drop slider on me", Color.red]])
.canReceiveDragHandler_({ true })
.receiveDragHandler_({
var gui;
gui= GUI.view.currentDrag;
b.action = {|v|
gui.value= v.value; //this works *sometimes*, but mostly not
//gui.postln; //works
//gui.value.postln; //works
}
});
};
f.front;
)
best,
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/