<div dir="ltr">Each class has methods that can be looked up by symbol.  At some point after the class has been created, you could check the class has no bang method, and if so, add the default bang method.  Only built-in classes are loaded when pd starts up, so if you load a class later, it would not have the default method.<br>
<div><div class="gmail_extra"><br>If you wanted it done at setup time, you would have to modify the function that calls the setup function (I don&#39;t know what it is or how it&#39;s done--please tell me) so you would follow the setup function and add default methods.</div>
<div class="gmail_extra"><br></div>Chuck<div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 27, 2013 at 5:05 PM, Ivica Ico Bukvic <span dir="ltr">&lt;<a href="mailto:ico@vt.edu" target="_blank">ico@vt.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I wonder if we could as part of the setup call for each external somehow<br>
infer default behaviors for each object e.g.:<br>
<br>
something_bang() {<br>
        Error(&quot;this inlet does not support bang message\n&quot;);<br>
}<br>
etc.<br>
<br>
Then if that particular object has another addmethod after it referencing<br>
its own genuine bang (or whatever) method, such call would override the<br>
original. I am just not sure if this is possible in the first place and<br>
whether that could produce some misleading messages as well (e.g. I just<br>
fixed cxc/ascseq crash when receiving a bang but this was solved without<br>
having the bang function--this may be fixed by the aforesaid approach as<br>
long as this is somehow possible as part of the setup function and without<br>
having to manually alter every single external&#39;s setup function and assuming<br>
that bang function will take precedence over the anything function).<br>
<br>
Thoughts?<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:pd-list-bounces@iem.at">pd-list-bounces@iem.at</a> [mailto:<a href="mailto:pd-list-bounces@iem.at">pd-list-bounces@iem.at</a>] On Behalf Of<br>
&gt; Jonathan Wilkes<br>
&gt; Sent: Monday, February 25, 2013 8:18 PM<br>
&gt; To: pd-list<br>
&gt; Subject: [PD] bang vs empty list<br>
&gt;<br>
&gt; Seems like for any object that doesn&#39;t have a bang method nor list method,<br>
&gt; an empty list silently gets discarded.<br>
&gt;<br>
&gt; compare<br>
&gt;<br>
&gt; [bang(<br>
&gt; |<br>
&gt; [sin]<br>
&gt;<br>
&gt; to<br>
&gt;<br>
&gt; [list(<br>
&gt; |<br>
&gt; [sin]<br>
&gt;<br>
&gt; or, more likely<br>
&gt;<br>
&gt; [bang(<br>
&gt;<br>
&gt; |<br>
&gt; [t a]<br>
&gt; |<br>
&gt; [sin]<br>
&gt;<br>
&gt; Same for [select] and many others.<br>
&gt;<br>
&gt; Is there a way to fix this?<br>
&gt;<br>
&gt; -Jonathan<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; <a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
&gt; UNSUBSCRIBE and account-management -&gt;<br>
&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
</div></div></blockquote></div><br></div></div></div>