Author Topic: OnDocActivated is run when cursor hovers over tab  (Read 84 times)

funkitect

  • Member
  • *
  • Posts: 32
OnDocActivated is run when cursor hovers over tab
« 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

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 2983
    • Outside The Box
Re: OnDocActivated is run when cursor hovers over tab
« Reply #1 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.

funkitect

  • Member
  • *
  • Posts: 32
Re: OnDocActivated is run when cursor hovers over tab
« Reply #2 on: December 12, 2018, 02:43:45 PM »
OK.  Thanks Owen.  I'll take another look with that perspective.