<div class="markdown_content"><hr/>
<p><strong> <a class="alink" href="http://sourceforge.net/p/pure-data/patches/567/">[patches:#567]</a> prevent TCL-backtrace when using plugin-dispatch with an unknown receiver</strong></p>
<p><strong>Status:</strong> open<br/>
<strong>Group:</strong> bugfix<br/>
<strong>Labels:</strong> pd-gui <br/>
<strong>Created:</strong> Sat Nov 21, 2015 10:22 PM UTC by IOhannes m zmölnig<br/>
<strong>Last Updated:</strong> Sat Nov 21, 2015 10:22 PM UTC<br/>
<strong>Owner:</strong> Miller Puckette<br/>
<strong>Attachments:</strong></p>
<ul>
<li><a class="" href="https://sourceforge.net/p/pure-data/patches/567/attachment/0001-check-whether-a-plugin-dispatcher-is-registered-for-.patch">0001-check-whether-a-plugin-dispatcher-is-registered-for-.patch</a> (1.6 kB; text/x-diff)</li>
</ul>
<p>there's a "plugin-dispatch" mechanism built into pd/pd-gui, that provides a uniform way to send messages from pd-core (e.g. an abstraction) to a pd-gui plugin.</p>
<p>unfortunately, the current implementation does not do any error checking, so if an abstraction assumes that a gui-plugin is installed (although it is not) and sends <code>[; pd plugin-dispatch foo(</code> (where <em>foo</em> is the receiver label of the gui plugin), then Pd will give a long and ugly <strong>Tcl-Backtrace</strong>, which is not very helpful to anybody.</p>
<p>the attached patch fixes this by silently ignoring <code>plugin-dispatch</code> messages to unknown receivers (assuming that it's easy on the patch/plugin level to establish a little ping/pong handshake between patch and gui-plugin to establish the proper initialization of both, and issue an error if this is not the case).</p>
<p>an alternative solution would be to replace the backtrace by a single error-line (though this does not allow for custom error messages :-()</p>
<hr/>
<p>Sent from sourceforge.net because pd-dev@lists.iem.at is subscribed to <a href="https://sourceforge.net/p/pure-data/patches/">https://sourceforge.net/p/pure-data/patches/</a></p>
<p>To unsubscribe from further messages, a project admin can change settings at <a href="https://sourceforge.net/p/pure-data/admin/patches/options.">https://sourceforge.net/p/pure-data/admin/patches/options.</a>  Or, if this is a mailing list, you can unsubscribe from the mailing list.</p></div>