[PD-dev] [ pure-data-Bugs-1890931 ] [list-split] outputs bad bang type

SourceForge.net noreply at sourceforge.net
Mon Feb 11 09:51:40 CET 2008


Bugs item #1890931, was opened at 2008-02-11 07:01
Message generated for change (Comment added) made by claudiusmaximus
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478070&aid=1890931&group_id=55736

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: Nobody/Anonymous (nobody)
Summary: [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 08: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 08: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&group_id=55736




More information about the Pd-dev mailing list