<html><body>
<p><tt>Gustaf Neumann <neumann@wu-wien.ac.at> wrote on 05/06/2006 05:10:24 PM:<br>
<br>
> Scott Gargash schrieb:<br>
> ><br>
> > Hello,<br>
> ><br>
> > I've run into an issue when trying to remove a mixin from an object. <br>
> > It appears that removing a mixin from an object interacts with the <br>
> > method chaining, such that the "next" isn't invoked.<br>
> ><br>
> scott,<br>
> <br>
> in your example, you are trying to delete the currently active mixin <br>
> from the mixin list (xotcl needs it<br>
> currently to continue from that point in the mixin chain), and then you <br>
> are deleting the object anyhow.<br>
> Most probably, we should rise an error in such cases.<br>
> <br>
> what is your intention, what lead you to this construction?<br>
</tt><br>
<tt>In my particular case, I'm manipulating a graph. Some nodes have mixins that are used to notify other connected nodes. 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). Since "move" 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 "destroy". Is it not considered acceptable to ever remove a mixin class? When is it valid to remove a mixin if removing it corrupts the method chaining? </tt><br>
<br>
<tt>        Scott</tt><br>
</body></html>