Ah that is nice, you just don't need the set messages. :)<div><br></div><div>I always looked at the iem gui objects as more sophisticated and better for GUI front ends, not meant for writing a self-documenting patch. They save time and look/act better, but everyone I have met using pd for educational purposes uses the more simple numberbox.</div>
<div><br></div><div>rich<br><br><div class="gmail_quote">On Sun, Jan 17, 2010 at 12:23 AM, Jonathan Wilkes <span dir="ltr"><<a href="mailto:jancsika@yahoo.com">jancsika@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I attached a modified version of your patch to show what I mean. On the<br>
right, you can look at the patch and figure out the behavior before you<br>
scroll the gatom box (important if you want to make sure you're avoiding<br>
a buffer overflow).<br>
<br>
On the left, you have to read the source code for those GUI objects to<br>
figure out what's going to happen. Judging from your original patch,<br>
I think you assumed that sending a float straight to the [nbx] would<br>
update the value in the slider (so did I). This turns out not to be the<br>
case: the two GUIs are only bound together if you change the values on one<br>
of them using the mouse.<br>
<br>
If someone who reads and understands c better than me can explain why<br>
the iemgui magic works as it does, I'll be happy to document it.<br>
<br>
-Jonathan<br>
<br>
<br>
<br>
--- On Sat, 1/16/10, Rich E <<a href="mailto:rich.eakin@gmail.com">rich.eakin@gmail.com</a>> wrote:<br>
<br>
> From: Rich E <<a href="mailto:rich.eakin@gmail.com">rich.eakin@gmail.com</a>><br>
<div class="im">> Subject: Re: [PD] 'synced' number and slider<br>
</div>> To: "Jonathan Wilkes" <<a href="mailto:jancsika@yahoo.com">jancsika@yahoo.com</a>><br>
> Cc: "Lorenzo" <<a href="mailto:lsutton@libero.it">lsutton@libero.it</a>>, "IOhannes zmölnig" <<a href="mailto:zmoelnig@iem.at">zmoelnig@iem.at</a>>, <a href="mailto:pd-list@iem.at">pd-list@iem.at</a><br>
> Date: Saturday, January 16, 2010, 8:38 PM<br>
<div><div></div><div class="h5">> You can still send the set message directly<br>
> to the inlet of the numberbox2 or slider and it won't<br>
> effect the other. See patch. <br>
><br>
> 2010/1/16 Jonathan Wilkes <<a href="mailto:jancsika@yahoo.com">jancsika@yahoo.com</a>><br>
><br>
><br>
><br>
><br>
><br>
> --- On Sat, 1/16/10, IOhannes zmölnig <<a href="mailto:zmoelnig@iem.at">zmoelnig@iem.at</a>><br>
> wrote:<br>
><br>
><br>
><br>
> > From: IOhannes zmölnig <<a href="mailto:zmoelnig@iem.at">zmoelnig@iem.at</a>><br>
><br>
> > Subject: Re: [PD] 'synced'<br>
> number and slider<br>
><br>
> > To: "Lorenzo" <<a href="mailto:lsutton@libero.it">lsutton@libero.it</a>><br>
><br>
> > Cc: <a href="mailto:pd-list@iem.at">pd-list@iem.at</a><br>
><br>
> > Date: Saturday, January 16, 2010, 11:36 AM<br>
><br>
> > Lorenzo wrote:<br>
><br>
> > > This seems trivial but I've never managed to<br>
> figure<br>
><br>
> > out how to do it in<br>
><br>
> > > a non-trivial way:<br>
><br>
> > ><br>
><br>
> > > Have a number (atom) and a slider (be it<br>
> horizontal or<br>
><br>
> > vertical) which<br>
><br>
> > > are 'synced', that is if one changes the<br>
> number the<br>
><br>
> > slider changes and<br>
><br>
> > > vice-versa.<br>
><br>
> ><br>
><br>
> ><br>
><br>
> > if you use numberbox2 as the numberbox, you can give<br>
> both<br>
><br>
> > the nbx and<br>
><br>
> > the slider the same send/receive names<br>
><br>
> > (that is:<br>
><br>
> ><br>
> numberbox2.sendname=numberbox2.receivename=slider.sendname=slider.receivename)<br>
><br>
> ><br>
><br>
> > and they will be magically linked to each other.<br>
><br>
> ><br>
><br>
> > to use the value in the patch add another receiver<br>
><br>
> > [r <samereceivename>]<br>
><br>
> ><br>
><br>
><br>
><br>
> Except if you need to send a value to the inlet<br>
> of the numbox2 or the slider. Then this method magically<br>
> doesn't work, whereas the [set $1(<br>
><br>
> idiom does.<br>
><br>
><br>
><br>
> > gfmadr<br>
><br>
> > IOhannes<br>
><br>
> ><br>
><br>
> ><br>
><br>
> > -----Inline Attachment Follows-----<br>
><br>
> ><br>
><br>
> > _______________________________________________<br>
><br>
> > <a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a><br>
><br>
> > mailing list<br>
><br>
> > UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
><br>
> ><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
><br>
> <a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a><br>
> mailing list<br>
><br>
> UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
><br>
><br>
><br>
><br>
<br>
<br>
</div></div></blockquote></div><br></div>