<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Thanks Liam! That sounds very promising. I'll give it a go! Cheers<br><br>Skickat från min iPhone</div><div><br>8 apr 2016 kl. 19:03 skrev Liam Goodacre <<a href="mailto:liamg_uw@hotmail.com">liamg_uw@hotmail.com</a>>:<br><br></div><blockquote type="cite"><div>

<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">One solution is to give each abstraction instance its own ID number from within the patch, bypassing $0. Ie. if you do this:<br><br>[loadbang]<br>|<br>[value load] x [+ 1]<br>|<br>[s $0-my-number]<br><br>you will generate unique numbers (1, 2, 3...) for each instance, according to creation order.<br><br>Things get complicated here when you decide to delete one of the instances and then save the patch--all of the subsequent numbers will be off when you re-load. You can probably get around this by having them all re-calculate every time one is loaded.<br><br><br><div>> From: <a href="mailto:monologx@gmail.com">monologx@gmail.com</a><br>> Date: Fri, 8 Apr 2016 16:36:54 +0200<br>> To: <a href="mailto:pd-list@lists.iem.at">pd-list@lists.iem.at</a><br>> Subject: [PD] $0-abstraction question<br>> <br>> Dear List,<br>> <br>> This is my first time writing here so please be gentle. :-)<br>> I'm working on a state saving system in vanilla for multiple instances of the same abstraction. I've got a good system up and running where I'm writing and reading to textfile using numerical creation arguments for the abstractions to separate the textfiles from each other. However, it would be a lot easier if the unique four digit $0 digits of the abstraction was saved with the .pd-file and not given a new number on re-booting the patch. There is probably a million scenarios where this behaviour would be not desired that I'm unaware of. But it would be nice to be able to skip giving the abstraction an argument on creation. <br>> <br>> All best / Johan<br>> <br>> <br>> _______________________________________________<br>> <a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>> UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list">https://lists.puredata.info/listinfo/pd-list</a><br></div>                                     </div>
</div></blockquote></body></html>