Hallo, federico hat gesagt: // federico wrote:
if you look at the attached patch, i realized a template for array container (arr) and one for array point (node).
now i have some questions:
- although the template for node has only x/y vars, (in the data
window) i get the resize handle too.... but i haven't supplied a 'w' field in 'node'. why? my intention was: to connect these x/y points by a fixed width line.
You have some error in your use of [filledpolygon]: The argument count is wrong. I replaced them both with [drawpolygon] and then the width error went away. It's strange, that Pd reacts like this to a wrong usage of [filledpolygon], though.
- after placing the array, i use [setsize] to set num. of elements in
it. but the container doesn't grows horizontally, so it is painful have 10 points, all in the same x/y coordinate.
That's because you are using array elements that have a field "float x", so [plot] will take the x-spacing from the "node.x" value. This equals 0 after creation so all elements will be at x=0 (or rather at the point, where you start to [plot] which is not 0 in your example but 100). Attached patch shows one possible way to set the array element's x-values after creation.
- it is possible to set a constraint on a specific field? (i.e.: i do
not want the x value of a point to be negative.)
Not that I know. One neat trick could be to use the [mousefilter] external to catch mouse-up events and then check all values and reset them if needed.
Frank Barknecht _ ______footils.org__
_ __latest track: "scans" _ http://footils.org/cms/show/41