OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: funkitect on December 04, 2018, 03:48:04 PM

Title: OnDocActivated is run when cursor hovers over tab
Post by: funkitect on December 04, 2018, 03:48:04 PM
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
Title: Re: OnDocActivated is run when cursor hovers over tab
Post by: owenwengerd on December 05, 2018, 08:57:13 AM
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.
Title: Re: OnDocActivated is run when cursor hovers over tab
Post by: funkitect on December 12, 2018, 02:43:45 PM
OK.  Thanks Owen.  I'll take another look with that perspective.