OTOH, the workaround is quite easy: put the existing abstraction into a new 
abstraction and forward the creation arguments accordingly :-). Maybe add such 
an example to [clone]'s help patch? Would illustrate the behaviour quite well, 
I think.



> Gesendet: Mittwoch, 11. Mai 2016 um 17:26 Uhr
> Von: "Christof Ressi" <[email protected]>
> An: "IOhannes m zmoelnig" <[email protected]>
> Cc: "Miller Puckette" <[email protected]>, [email protected]
> Betreff: Re: [PD] [clone]'s instance number
>
> There's also a pitfall: additional creation arguments for the cloned 
> abstraction will start with $2.
> For example, in [clone 16 my-abstraction 1 5 9] '1' will be parsed as $2, '5' 
> as $3, '9' as $4 etc. 
> No problem, if the abstraction was written for being used with [clone], but 
> bad when cloning existing abstractions.
> 
> I'm wondering if there could be a way to get the abstraction ID without 
> messing up existing abstractions... Maybe have a dedicated object?
> 
> For now, I think it's important to mention the parsing of additional creation 
> arguments in the help file.
> 
> Christof
> 
> > Gesendet: Mittwoch, 11. Mai 2016 um 16:25 Uhr
> > Von: "IOhannes m zmoelnig" <[email protected]>
> > An: [email protected]
> > Betreff: Re: [PD] [clone]'s instance number
> >
> > On 2016-05-11 16:18, Liam Goodacre wrote:
> > > Would it be possible to access [clone]'s unique instance number from 
> > > within the patch, a bit like a creation argument? This could be used to 
> > > achieve differentiation between the abstractions, ie. if the abstraction 
> > > contains "tabread4~ $-1.array" and the $-1 is replaced with the instance 
> > > number, then each instance could read a different file. Of course there 
> > > are other ways of doing this, but it would be neat to do it with clone, 
> > > and I'm wondering if there's a way.
> > 
> > 
> > isn't this what $1 is already doing in clone's instances?
> > 
> > 
> > fgasdmr
> > IOhannes
> > 
> > _______________________________________________
> > [email protected] mailing list
> > UNSUBSCRIBE and account-management -> 
> > https://lists.puredata.info/listinfo/pd-list
> > 
> 
> _______________________________________________
> [email protected] mailing list
> UNSUBSCRIBE and account-management -> 
> https://lists.puredata.info/listinfo/pd-list
> 
#N canvas 435 322 450 300 10;
#X obj 41 76 clone 16 test-abs-wrapper 1 2 3;
#X obj 44 100 print;
#X msg 41 52 all bang;
#X connect 0 0 1 0;
#X connect 2 0 0 0;
#N canvas 837 244 450 300 10;
#X obj 34 57 inlet;
#X obj 40 199 outlet;
#X obj 37 126 pack \$1 \$2 \$3;
#X obj 35 95 b;
#X connect 0 0 3 0;
#X connect 2 0 1 0;
#X connect 3 0 2 0;
#N canvas 834 316 450 300 10;
#X obj 79 107 test-abs \$2 \$3 \$4;
#X obj 77 74 inlet;
#X obj 79 137 outlet;
#X connect 0 0 2 0;
#X connect 1 0 0 0;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to