[PD] data structure array with text elements bug?

Jonathan Wilkes jancsika at yahoo.com
Wed May 27 03:46:12 CEST 2015


On 05/25/2015 11:27 AM, Jan Baumgart wrote:
> Hi there,
>
> I'm getting a strange warning, when working with a data structure 
> array containing text elements:
>
> "warning: word_restore: extra arguments"
>
> This message gets posted for every array element, when loading the data.

This means that each element of the array you are loading has more data 
than what you have
defined in the corresponding [struct].

For example-- suppose the [struct] for your array elements is defined as 
[struct foo float y].  If you try to load
data where each array element has two floating point values, like "1" 
and "2", you'll get this warning.  Pd will load
"1" into the slot for the y field, but you don't have a field defined 
for "2".  That's why it complains.

This is a warning instead of an error presumably because it's easy to 
run into this problem.  For example, you
could build a patch using [struct foo float x float y].  After you saved 
the data, maybe you decided you didn't
need the "x", so you change it to [struct foo float y].  Now when you 
load the data, it has an extra argument
that gets discarded.

-Jonathan

>
> There's an example patch attached. Open test_preset_data_structure.pd 
> and click "read preset.txt".
>
> There's a comment in the text/data structure help patch saying:
> "bug - saving multi-line texts inside structures"
>
> As far as i can tell, the data gets stored and loaded correctly.
> Can i just ignore this warning, or should i be worried about losing data?
>
> thx,
> Jan
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150526/a4500a66/attachment.html>


More information about the Pd-list mailing list