[PD] first exercise with data structures

João Pais jmmmpais at googlemail.com
Tue May 28 11:25:07 CEST 2013


> Probably this has already been covered as a limitation and may I haven't
> really understood it. There is one thing troubling me at the moment.
> From what I can see, you can easily get data out of your data structure.
> And for what I am trying, editing data manually/per GUI is quite easy.
> But how to set data programmatically, i.e. by message? As you can only
> change a certain scalar by setting a pointer to it, the only way I see
> is to traverse all scalars until you find the one you want to change. Is
> this currently the only way to change a property of a particular scalar?

yes, you can only get or set data if you point to the relevant scalar.  
clicking allows you to get a pointer (for any method you want), but if you  
do everything with the program, you need to traverse until you get it  
right.
for that I usually create an identifier (number, symbol, whatever) that I  
use to confirm if I have the correct reference before editing it. the  
method was explained in a previous mail.
I guess the way you get the relevant pointer will vary on the program,  
difference contexts have different needs.

but the same happens when access/edit an element from a list or an array.  
the program must know beforehand (by user interaction or by the program  
itself) which element is relevant.



More information about the Pd-list mailing list