[PD] deleting inlets/outlets at runtime.

Mathieu Bouchard matju at artengine.ca
Tue Jul 25 01:16:16 CEST 2006



since right now, when writing externals using GridFlow/Ruby, adding inlets at 
runtime using:

   self.add_inlets n

is obsolete and to be replaced by:

   self.ninlets += n

because this also allows those forms:

   self.ninlets -= n
   self.ninlets = n

which may delete inlets if the value of ninlets becomes smaller than what it 
was (please don't delete inlets that are still connected, because then, Pd goes 
crazy).

all those things also work with self.noutlets= as a replacement of 
self.add_outlets.

since right now, GridFlow also redraws the object on which inlets/outlets have 
been added (or removed) at runtime (previously one had to minimize the canvas 
and then unminimize it to reveal changes, or else do it during initialize2 
which is called just before the object is drawn).

As for anything else in Ruby, those things are available from C/C++ using 
rb_funcall.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada


More information about the Pd-list mailing list