.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Removing event handlers from objects during undo

1 REPLY 1
SOLVED
Reply
Message 1 of 2
nshupeFMPE3
412 Views, 1 Reply

Removing event handlers from objects during undo

I have a command where I add xdata and event handlers to a selected polyline. But when I undo that command, the objects still react to the event handlers. 

Why aren't the event handlers being removed during the undo?

Labels (4)
1 REPLY 1
Message 2 of 2
nshupeFMPE3
in reply to: nshupeFMPE3

I think I have solved my problem. During the undo the event handlers fire, I check to see if the object is open for undo. If it is I just exit the event handler. Then later in the event handler method I check if the object should still have the event handlers, in my case whether the object has xdata that I want, if it does not, then it should not have the event handler and the handler is removed. I was trying to remove it while it was open for undo, but I think it had to be removed later when it wasn't open for undo

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report