--- On Wed, 3/3/10, Jack <j...@rybn.org> wrote:
> From: Jack <j...@rybn.org> > Subject: Re: [PD] integer values > To: "Jonathan Wilkes" <jancs...@yahoo.com> > Cc: pd-list@iem.at, "volker böhm" <vbo...@gmx.ch> > Date: Wednesday, March 3, 2010, 2:20 PM > Le mardi 02 mars 2010 à 22:47 -0800, > Jonathan Wilkes a écrit : > > > > --- On Wed, 3/3/10, Jack <j...@rybn.org> > wrote: > > > > > From: Jack <j...@rybn.org> > > > Subject: Re: [PD] integer values > > > To: "Jonathan Wilkes" <jancs...@yahoo.com> > > > Cc: pd-list@iem.at, > "volker böhm" <vbo...@gmx.ch> > > > Date: Wednesday, March 3, 2010, 2:16 AM > > > There is a very small error in the > > > patch : > > > [s linked_array] -> [s linked_garray]. > > > However, this is a nice example. > > > I'm working on data structures (for automations) > and it > > > would be nice to > > > have a 'return' from [struct] (or something like > that, but > > > i don't know > > > what :) when you modify an array of scalars (with > mouse) > > > without [metro] > > > to update some values (like in your patch with > the array > > > 'linked_garray', but without a [metro] to > update). > > > Hope what i mean is enough clear ? > > > ++ > > > > > > Jack > > > > Thanks for finding the error-- I must have forgotten > to save after I made > > that needless change. > > > > So which [struct] would the message come out of when > modifying an element > > of an array-- the [struct] that defines the array or > the [struct] that defines the element being modified? > I don't know, that's why i ask ;) > When you modify the size of a polygon, [struct] return a > message. Why is > it not possible with a [struct] that defines the array ? > > > > > If it's the [struct] that defines the array, then how > do you specify which > > array and which index number of the thing that's > getting moved? > Just receive a message there is an update of the array ? I don't think that would help very much, because you don't know which value was changed, or to which array it belongs (if you have more than one array in a struct). You would at least want to know the array name and index of the element being modified. So if I move the first element of the "boxes" array in that patch, it would be nice if I got the following message: change boxes 0 (pointer) So the pointer here points to the [graph] data structure-- in other words the one that defines that array. Putting the atoms of the message in that order would work well because you can route according to the array name, then immediately send the next message to the left inlet of [element] to do whatever it is you want to do with that data (or precede it with an [unpack 0 p] if you want to be finicky). But if the message is to come out of the [struct] that defines the element (box), you'd probably want a different set of info in the message. Btw- if you hook up [print] to the outlet of [struct box] in that patch, you'll see that every time you click somewhere in the array a series of messages is output. I don't understand what the numbers mean, and the (pointer) doesn't correspond to either of the data structures I have defined. But even if it did, that would be a lot of messages to deal with every time you happen to click the containing scalar (imagine if you're using a ds-array to visualize/manipulate five seconds of audio...) -Jonathan _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list