On Sun, 2008-11-23 at 11:41 +0100, Damian Stewart wrote:
this has probably been discussed before, but i don't have internet right now and so cannot check.
i'm trying to build a generic store-anything object. see attached. but i'm having some trouble getting around the weird way Pd seems to handle symbols, particularly with [route].
according to the help patch for [route]:
'To avoid confusion between, say, the number 5 and the list contining only the number 5, both messages match "float", and ditto for symbols.
yeah. from what i understand this means: 'list bla' and 'symbol bla' are treated the same. if i am not totally mistaken, 'list yeah' is converted to 'symbol yeah' by many classes anyway. try
[list yo( | [print]
for lists with only one element, the selector 'list' is converted to either 'float' or 'symbol'. an incoming message with an 'anything' selector (for instance 'mysym') is _not_ converted to a 'symbol' message. i think, that is the cause of your confusion.
An empty list matches "bang". In Pd these are all considered special cases of lists.'
so, by my reading of this, in particular, the bit that says "and ditto for symbols", if i go
[route symbol float]
and then send in
[mysym (
the 1st outlet should send out 'mysym', yes? this isn't what's happening. in fact, the 3rd outlet is sending out just 'mysym'. if i send in
because 'mysym' is not a symbol message, which means in pd lingo: "it does not have the 'symbol' selctor"
[symbol mysym (
then the 1st outlet sends out 'symbol mysym'. but, if i want to route the 'mysym' message somewhere:
[route mysym]
it never gets picked up on if it is being sent out as 'symbol mysym'
yeah, because the selector is 'symbol' then, not 'mysym'.
... so. it seems i need to use [select] and not [route] in this case.
in which case? if you want to match both, 'mysym' and 'symbol mysym', i'd put a [list trim] in front of route.
if i'm not mistaken, the help patch for [route] needs updating.
i guess, the help patch is correct, though a bit a confusing.
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de