[PD] how to detect if array has changed

Jack jack at rybn.org
Mon Dec 27 18:02:08 CET 2010


Just output the value store in the array at the desire index (with
[tabread]) before to write the new value (at the same index) and compare
this new value with the old with [==]. If the result is false (0) then
the array change. You get also the index that changed.
Or i miss something ?
++

Jack



Le lundi 27 décembre 2010 à 11:44 -0500, Ivica Ico Bukvic a écrit :
> Is there anything in the API that offers ability to detect when an array
> has been changed and then act upon it? This would be quite useful when
> using array as a multislider to change values. If there isn't I am
> proposing providing an invisible send from array whenever it is changed
> with the name <array_name>_changed. It could also send exactly which
> element has changed.
> 
> Likewise, for the same reason, I would like to provide clipping of the
> drawn items to the visible area but before I do so, is there a reason
> one would want to keep outside elements visible as well despite their
> distracting appearance?
> 
> Ico
> 
> 
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list





More information about the Pd-list mailing list