Patches item #1826144, was opened at 2007-11-05 10:41 Message generated for change (Comment added) made by eighthave You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1826144...
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: feature Status: Open Resolution: None Priority: 5 Private: No Submitted By: IOhannes m zmölnig (zmoelnig) Assigned to: Miller Puckette (millerpuckette) Summary: accept atoms as lists on righthand inlets
Initial Comment: when an object has a list-method on its left inlet, it will happily accept floats and symbols as well (and handle them as 1-atom lists), if no specific method for these types is defined.
however, this is not true for right-hand inlets.
if such an inlet (with a "list" method, as declared with receives a single float number (as output by the numberbox), it bails out with "error: inlet: expected 'list' but got 'float'"
this is especially sad, as there is no way to add methods for several types of messages to a right-hand inlet (well, there are methods like using proxys; but we don't want to go into that)
a workaround for this is to run the message through [list] (or [list $1(), however i would rather not use this.
instead, the attached patch fixes this by modifying the inlet_* methods in m_obj.c to fallback to inlet_list() if all else fails.
btw, this is the code i use to add a list-method to the 2nd outlet:
new{ ... inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_list, gensym("list2")); } setup{ ... class_addmethod(myobj_class, (t_method)myobj_list2, gensym("list2"), A_GIMME, 0); })
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave)
Date: 2007-11-05 11:58
Message: Logged In: YES user_id=27104 Originator: NO
Sounds very useful, but I am sure there have got to be some unwanted ramifications. Do you have any idea what they might be?
Is this ready to be included in 0.40.3-extended ?
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1826144...