Bugs item #1890931, was opened at 2008-02-11 08:01 Message generated for change (Settings changed) made by zmoelnig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1890931...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata Group: v0.41.0 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Luke Iannini (lukeiannini)
Assigned to: Miller Puckette (millerpuckette) Summary: empty lists != bang ([list-split] outputs bad bang type)
Initial Comment: Hi, Attached it a patch demonstrating the bug. [list-split] outputs a bang on the right outlet when the input is a bang, but it seems to invisibly add the "list" selector so that the bang is unrecognized by, for example, [until] (giving the error: inlet: expected 'bang' but got 'list')
Cheers Luke
----------------------------------------------------------------------
Comment By: ClaudiusMaximus (claudiusmaximus) Date: 2008-02-11 09:51
Message: Logged In: YES user_id=769033 Originator: NO
I'd say it was a bug in Pd core. Rather than adding special cases to *all* objects, I think the "distribute lists over inlets if there is no method for 'list'" code should notice empty lists and call the 'bang' method, furthermore extra 'list' methods for objects that don't really need them should be removed. Both these steps are necessary to maintain the ("list",{}) == ("bang",{}) invariant in more places with less code.
Something like this (totally untested, so be warned):
--- m_obj.c.orig 2008-02-11 08:48:44.000000000 +0000 +++ m_obj.c 2007-12-17 20:28:49.000000000 +0000 @@ -224,7 +224,7 @@ t_atom *ap; int count; t_inlet *ip = ((t_object *)x)->ob_inlet; - if (!argc) return; + if (!argc) { pd_bang(&x->ob_pd); return; } for (count = argc-1, ap = argv+1; ip && count--; ap++, ip = ip->i_next) { if (ap->a_type == A_POINTER) pd_pointer(&ip->i_pd, ap->a_w.w_gpointer);
----------------------------------------------------------------------
Comment By: Frank Barknecht (fbar) Date: 2008-02-11 09:24
Message: Logged In: YES user_id=569446 Originator: NO
I guess you mean [list split] (without dash). If it's a bug it's one in [until] I believe. [list split] outputs a zero-element list in your example, which is what the help-file says it would do. Usually empty lists get converted to a bang. I suppose this happens at an object's inlet. However [until] doesn't convert - probably it needs to get a until_list2(...) method?
(Btw: Better avoid whitespace in the names of example patches uploaded here. I uploaded a new version and deleted the old.) File Added: list-split-bug.pd
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1890931...