<html><body>
<p><tt>Gustaf Neumann &lt;neumann@wu-wien.ac.at&gt; wrote on 05/06/2006 05:10:24 PM:<br>
<br>
&gt; Scott Gargash schrieb:<br>
&gt; &gt;<br>
&gt; &gt; Hello,<br>
&gt; &gt;<br>
&gt; &gt; I've run into an issue when trying to remove a mixin from an object. <br>
&gt; &gt; It appears that removing a mixin from an object interacts with the <br>
&gt; &gt; method chaining, such that the &quot;next&quot; isn't invoked.<br>
&gt; &gt;<br>
&gt; scott,<br>
&gt; <br>
&gt; in your example, you are trying to delete the currently active mixin <br>
&gt; from the mixin list (xotcl needs it<br>
&gt; currently to continue from that point in the mixin chain), and then you <br>
&gt; are deleting the object anyhow.<br>
&gt; Most probably, we should rise an error in such cases.<br>
&gt; <br>
&gt; what is your intention, what lead you to this construction?<br>
</tt><br>
<tt>In my particular case, I'm manipulating a graph. &nbsp;Some nodes have mixins that are used to notify other connected nodes. &nbsp;When a node (with this particular mixin) is destroyed, it notifies connected nodes that it's being disconnected. Another mixin class later in the chain intercepts the destroy call and moves the node back to a pool (the nodes manipulate a fixed pool of hardware resources, so they need to be tracked and reused). &nbsp;Since &quot;move&quot; reinvokes the destructor, if I don't remove the notification mixin from the object, connected nodes are doubly notified (bad), but when I remove the mixin, I don't get the correct chaining behavior and resource reclamation. </tt><br>
<br>
<tt>BTW, this will happen with any method, not just &quot;destroy&quot;. &nbsp;Is it not considered acceptable to ever remove a mixin class? &nbsp; When is it valid to remove a mixin if removing it corrupts the method chaining? &nbsp;</tt><br>
<br>
<tt>        Scott</tt><br>
</body></html>