[PD] widget definition files

Krzysztof Czaja czaja at chopin.edu.pl
Wed Aug 18 17:06:17 CEST 2004

hi Tim,

Tim Blechmann wrote:
>>you pointed out, the listvariable has to be defined before the listbox
>>be created ... how is it possible to do define this variable in advance?

only said it should be unique.  The -listvariable option creates
the variable, if necessary.

> never mind, i figured out that the _whole_ .wid file will be executed at
> startup ...

there are several blocks of .wid code, which are executed in
a different context each:

1. Setup scriptlet is executed only once, right after the .wid
file has been read -- it is pushed to the pdgui layer by the
constructor of the oldest object using the file.  This part
should be used for procedure definitions, etc.

2. Creator scriptlet (not handled yet by the released toxy
version) is executed once for every Pd [widget] object of the
particular type -- it is pushed by the constructor of that object.

3. Initializing scriptlet is executed right after the Tk widget
has been created and configured, i.e. whenever an invisible Pd
object receives the 'vis' message.

4. Each of the message handlers is pushed whenever an object
receives the corresponding message.

Currently, the structure of a .wid file is positional

<properties (options, arguments, and handlers)>


More information about the Pd-list mailing list