----- Original Message -----
From: Thomas Mayer thomas@residuum.org To: "pd-list@iem.at" pd-list@iem.at Cc: Sent: Wednesday, August 31, 2011 4:28 PM Subject: [PD] Problem with lists and data
Hi there,
while developping my CouchPdb library I came up with the following problem:
I put out lists like this:
list _id 1 list pitch 440
Now I am trying to get the values for _id and pitch as floats, but that does not seem to work:
[couchdb] | [list trim] | [route _id pitch] \ | \ | [f] [f]
But I am always getting the message:
error: inlet: expected 'float' but got '1'
That probably means you're formatting that part of your list as symbol-atom '1' instead of float-atom '1'.
Thus, the [route] object is outputting symbol-atom '1', which is just a message where the selector is the symbol-atom '1'. The right inlet of [f] has a method for messages with the selector 'float', but it doesn't have a symbol-atom '1' method, so you get the error.
-Jonathan
When I try to use [symbol] instead of [f], I get a similar error message.
In my object I do the following:
t_atom out_data[2] SETSYMBOL(&out_data[0], gensym(key)); SETFLOAT(&out_data[1], json_object_get_double(val)); outlet_list(data_outlet, &s_list, 2, &out_data[0]);
What am I doing wrong?
Best regards, Thomas -- "Chaney was aware that anything, however small, can get the eye of the media if it's repulsive enough." (Robert Anton Wilson - The Universe Next Door) http://www.residuum.org/
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list