---

** [patches:#528] Ability to dispatch messages from running Pd patches to 
loaded tcl plugins**

**Status:** open
**Group:** feature
**Created:** Sun Jul 13, 2014 09:41 PM UTC by Chris McCormick
**Last Updated:** Sun Jul 13, 2014 09:41 PM UTC
**Owner:** Miller Puckette

To test this patch out once applied, place the attached tcl plugin 
"test-dispatch-receiver-plugin.tcl" in ~/pd-externals/ and load the patch 
"test-plugin-dispatch-receiver.pd" in Pd.

---

This patch lets a user send a message from a running Pd patch to a loaded tcl 
plugin. Plugins can register a receiver name to receive on with 
::pd_connect::register_plugin_dispatch_receiver and patches can send to that 
receiver with a message to "pd plugin-dispatch RNAME" where RNAME is the name 
of the receiver registered by the tcl plugin.

Practical example: user could write an HTTP fetcher tcl plugin and have it 
receive on the name "http-fetch". A patch could then send a request to the 
plugin to fetch a web page using a Pd message like this:

[; pd plugin-dispatch http-fetch result_receiver_name http://mysite.com/(

The plugin could go away and do the fetch, process what it gets back, and then 
send the result back to result_receiver_name when done.

Along with ::pd_connect::pdsend on the tcl side this gives a two-way interface 
from Pd patches to tcl plugins and back again.

This patch is also available on this git branch if you want to pull directly:
https://github.com/chr15m/pure-data/commits/plugin-dispatch-messages



---

Sent from sourceforge.net because [email protected] is subscribed to 
https://sourceforge.net/p/pure-data/patches/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/pure-data/admin/patches/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Pd-dev mailing list
[email protected]
http://lists.puredata.info/listinfo/pd-dev

Reply via email to