#93 [initbang]/[closebang] for patch constructor/destuctor

wishlist
open
puredata (375)
5
2006-08-22
2006-08-21
No

attached is a patch that adds a new object [initbang]
to Pd.

This object is similar to [loadbang], however it gets
executed just after the rest of the abstraction is
built and _before_ the parent of the abstraction is
finished.

reasoning:
this object allows abstractions to have a runtime
constructor (similar to the <object>_new() constructor
of c-externals); the [initbang] is emitted before the
parent patch is finalized, thus allowing the
abstraction to add inlets/outlets depending on its
arguments).

caveats:
a similar method for the abstraction _destructor_ is
still missing.

i haven't implemented an "initbang" message to the
canvas to rerun the initialization again.

Discussion

  • Logged In: YES
    user_id=564396

    the 2nd patch additionally implements a [closebang] object,
    which gets called just before a canvas is destroyed.

    note that the patch (cloeinitbang.diff) holds both the
    closebang- and the initbang-changes; do not! apply both patches

     
    • summary: [initbang] for abstraction-constructor --> [initbang]/[closebang] for patch constructor/destuctor
     
  • Logged In: YES
    user_id=27104

    This is huge, it allows Pd objects to dynamically generate
    inlets and outlets and have then work properly.

     


Anonymous


Cancel   Add attachments