[PD-dev] pd parser + creating inlets/outlets outside of new-method

Krzysztof Czaja czaja at chopin.edu.pl
Mon Apr 19 21:11:58 CEST 2004


hi Tom,

Tom Schouten wrote:
...
> 1. creating inlets/outlets on the fly (i.e. after an object is
> constructed) seems to work perfectly, except for them not being displayed
> in the gui. what should i do to 'refresh' ?

changing object's io after creation time is doing so after
the object has been connected already...

The natural way is for a user to change the text in an object
box.  Making this into an object's method is doable, but tricky
and rather ugly.  There are some special cases, like widget
transforming itself into an object box after Tcl/Tk failure, or
comment doing the same on demand.

> 2. is pd's parser available through some api? i'd like to load a textfile
> and convert it's content to pd messages / lists inside an object's
> constructor. (right now i need an external [textfile] object to boot a

calling binbuf_read_via_path(), or plain binbuf_read(), loads
a text file into a binbuf (an array of atoms).  That binbuf may be
then broken into pieces on semicolons and commas -- the simplest
example is in textfile_bang() from x_qlist.c.

Krzysztof





More information about the Pd-dev mailing list