<div class="gmail_quote">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> You can do that without persistent class slots -- make a counter class and<br>update its value.<br>Something like this:<br>
<br>(defpclass counter ()<br> ((classname :index t :initarg :classname)<br> (counter :initform 0)))<br><br>Then you can increment it automatically:<br><br>(defmethod initialize-instance ((foo bar) &key &allow-other-keys)<br>
(let ((counter (get-instance-from-value 'counter 'classname 'bar)))<br> (incf (slot-value counter 'counter))))<br><br>It isn't pretty but it will work.<br>Moreover, you need to implement this only once, so it doesn't matter how it<br>
is implemented.<br><br>If we implement class slots, they will work in a similar way under the hood.<br>
<div>
<div></div>
<div class="h5"><br> </div></div></blockquote>
<div> </div>
<div>Thanks. This is a neat trick.</div>
<div> </div>
<div>BTW: for now I have dropped the use of Elephant for some reasons (my own compilation issues with BDB, BDB licence, performance, query power). But thank you and other Elephant developers very much for your help in my investigation of this framework.</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div></div>