Hi, I haven't thought about your whole problem, but maybe this can help to avoid 'couldn't create' errors:
you can add a "fallout/" subdir in your project, that would contain a initbang.pd abstraction, doing whatever suits you. Then in the patch needing [initbang], you add a [declare -path iemguts -path fallback], so the iemguts/ directory has precedence over fallback/. Then you can use [initbang] (without the path) 'safely'. Attached is a short example. Le mer. 31 déc. 2025 à 15:29, Giulio Moro via Pd-list <[email protected]> a écrit : > Hi there, > I want to create an abstraction with a dynamic number of iolets. By > default it should require one argument and have one outlet. If more > arguments are present, then it should create one additional outlet for each > additional argument. My understanding is that in order to do that I need > `[iemguts/initbang]`. Now, I wouldn't want to add iemguts as a compulsory > dependency to my abstraction library and so I would want to make its use > optional, so that the single-argument version still works without it. Here > are my requirements: > 1- if single arguments and iemguts it not available, it shouldn't print > `iemguts/initbang... couldn't create`, as that would be disruptive > 2- if multiple arguments and iemguts is available, it should use it > 3- if multiple arguments and iemguts is not available, it should print a > meaningful error > and optionally: > 4- in case 3, it shouldn't print `iemguts/initbang... couldn't create` > alongside the meaningful error > > If I didn't care about 1, it would be very straightforward: just hardcode > a single outlet and then create more as needed if iemguts/initbang is > available. But, as I do care, is there some way to suppress the couldn't > create message, or detect the availability of iemguts before instantating > it (all at init time, which may be complicated), or - perhaps more simply - > to have some vanilla way of sending an initbang? > > Thanks, > Giulio > > --- > [email protected] - the Pure Data mailinglist > > https://lists.iem.at/hyperkitty/list/[email protected]/message/BYUF2ROQREGTKSSSANGERQQKI3JYL7EX/ > > To unsubscribe send an email to [email protected] mailing list > UNSUBSCRIBE and account-management -> https://lists.iem.at/ > >
<<attachment: initbang-abs.zip>>
--- [email protected] - the Pure Data mailinglist https://lists.iem.at/hyperkitty/list/[email protected]/message/OD37TN3F3YYZSWKTYCPK3E5KPYGZABAM/ To unsubscribe send an email to [email protected] mailing list UNSUBSCRIBE and account-management -> https://lists.iem.at/
