Since you too mentioned the |loadbang( message method, do you (or others) have an idea why nested loadbangs fire more than once with this method? [initbang] on the other hand works just as expected. This is not an issue if one uses loadbang only to initialize some variable, but it can induce subtle bugs once it triggers some action which should only happen once (e.g. incrementing a counter, dynamically creating objects etc.)
Is this expected, known behaviour or rather a bug?
See attached patch.
Christof
Gesendet: Freitag, 17. Februar 2017 um 10:41 Uhr Von: zmoelnig@iem.at An: pd-list@lists.iem.at Betreff: Re: [PD] Question about loadbang and dynamic sub-patches
On 02/17/2017 02:25 AM, Ivica Ico Bukvic wrote:
FWIW in pd-l2ork/purr-data loadbang fires even in dynamically created patches.
so does that mean, that if i have an abstraction "foo":
[loadbang] | [f 1] | [outlet]
and i dynamically create a patch including that abstraction, the loadbang will be lost on the created patch? (meaning: the following will not print: #X obj 100 100 foo; #X obj 100 200 print; #X connect 0 0 1 0; )
if it does print, i would be interested in the heuristic you used.
if it does indeed not print, then i think i just hit a bug (as the patch behaves different when created dynamically or not¹)
gfmsrda IOhannes
¹ it doesnt't in Pd vanilla, if you don't forget to send a "loadbang" message after doing the dynamic patching as a kind of "finalize".
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list