Hi Jonathan,
Thanks for the hint!
I think I've found the bug(?).
When you have a struct containing only a text field
[struct foo text z], pd seems to add an extranous "bang;" to the data
(see attached txt file in orig post).
Adding a float to the struct [struct float x text z] seems to resolve
the issue.
Not sure, if this is a bug or intended.
Cheers,
jan
On 05/27/2015 03:46 AM, Jonathan Wilkes via Pd-list wrote:
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
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management ->http://lists.puredata.info/listinfo/pd-list
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
--
Jan Baumgart
Technischer Mitarbeiter
Hochschule für Musik und Darstellende Kunst
Eschersheimer Landstr. 29-39
60322 Frankfurt am Main
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list