OnDocActivated is run when cursor hovers over tab

Started by funkitect, December 04, 2018, 03:48:04 PM

Previous topic - Next topic

funkitect

Hi All,

I've created a modeless dialog that needs to behave a certain way when a new drawing is opened/activated.  I've used the OnDocActivated event handler to deal with the situation.  There seem to be an bug.  The event is triggered when the cursor merely passes over a drawing tab but does not actually press/select the tab.  This really messes up my whole project.  Is this possible to fix?

James

owenwengerd

Documents get deactivated and activated all the time without opening or closing any drawings, so it does not seem appropriate for what you're after. You must have some mechanism to load your lisp code into each new document, e.g. via acaddoc.lsp or similar mechanism. Whatever initialization must be performed could be done at the time your lisp is being loaded.

funkitect

OK.  Thanks Owen.  I'll take another look with that perspective.