Author Topic: EA_OnContextItemDoubleClicked revisited  (Read 7723 times)

Knut Paulsen

  • EA User
  • **
  • Posts: 82
  • Karma: +1/-0
    • View Profile
EA_OnContextItemDoubleClicked revisited
« on: February 02, 2016, 06:15:53 pm »
Hi guys,

I was under the impression that both doubleclicking an element or selecting properties from the context menu would trigger EA_OnContextItemDoubleClicked. I am pretty sure this is how it used to work. But now it doesn't :-(

I have an addin implementing EA_OnContextItemDoubleClicked with a breakpoint on the first line. Doubleclicking and the breakpoint is hit, selecting properties and it is not. My addin overrides the property dialog, so it is pretty obvious that EA_OnContextItemDoubleClicked has not been called since it is the standard EA property dialog that is displayed in the case of context menu/Properties.

I have disabled all other addins to be sure nobody is playing with me :-)

I am using EA build 12.1.1226

Any ideas?

cheers
Knut

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: EA_OnContextItemDoubleClicked revisited
« Reply #1 on: February 02, 2016, 08:39:43 pm »
Try running with a different EA release (you can have different installations in parallel by simply renaming the program folder for EA before installing another one).

q.

EXploringEA

  • EA User
  • **
  • Posts: 172
  • Karma: +8/-0
    • View Profile
Re: EA_OnContextItemDoubleClicked revisited
« Reply #2 on: February 02, 2016, 09:25:39 pm »
I just checked with bld 1226 and EA_OnContextItemDoubleClicked is fired if properties selected in the project browser, but not on a diagram; can't remember what happened before.  But like you I use this to override EA properties in eaForms.... 

Would it be correct that in practice most users working in a diagram would double click?


EXploringEA - information, utilities and addins

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: EA_OnContextItemDoubleClicked revisited
« Reply #3 on: February 02, 2016, 09:59:57 pm »
Hi guys,


Interesting.

There are (at least) three ways to open a Properties dialog:
  • Right-click the item and select Properties.
  • Select the item and hit Enter (in the project browser, if the item is a diagram, the diagram is opened instead).
  • Double-click the item (in a diagram, if the item is a composite element, hyperlink or diagram frame/reference, the target diagram is opened instead).

Would it be correct that in practice most users working in a diagram would double click?
I'd say so -- except for composite elements.

IIRC, EA_OnContextItemDoubleClicked is fired in each case above (possibly not the diagram-in-project-browser case). I don't have a 12.1 test setup available, but I'd be interested to see which of the above now fire the event.

Quote from: MrWappy
I just checked with bld 1226 and EA_OnContextItemDoubleClicked is fired if properties selected in the project browser, but not on a diagram

I would actually argue that EA_OnContextItemDoubleClicked should only fire on an actual double-click, but then there should also be an event EA_OnPropertiesRequested which should be fired after EA_OnContextItemDoubleClicked but only if that has not been handled by an Add-In.

Two cents? Thank you.


/Uffe
My theories are always correct, just apply them to the right reality.

EXploringEA

  • EA User
  • **
  • Posts: 172
  • Karma: +8/-0
    • View Profile
Re: EA_OnContextItemDoubleClicked revisited
« Reply #4 on: February 02, 2016, 11:22:03 pm »
I should have noticed that on a diagram the right click properties is equivalent to "Alt+enter" and this combination has always opened the properties page regardless of where the item is selected, and does not fire an event.  I've always used this to open EA properties editor even when eaForms installed.

@Uffe agree that the it would be useful to differentiate real events so that when the item was selected from a context menu I knew that compared with double clicking the element in one of several locations.  However I guess this is probably too deeply established in EAs UI code.

BTW: Clicking a diagram in project browser fires the EA_OnContextItemDoubleClicked event.
EXploringEA - information, utilities and addins

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: EA_OnContextItemDoubleClicked revisited
« Reply #5 on: February 03, 2016, 01:34:02 am »
To elaborate on Uffe's post:

  • Right-click the item in browser/diagram and select Properties.
  • Select the item and hit Enter (in the project browser, if the item is a diagram, the diagram is opened instead). in browser/diagram
  • Double-click the item (in a diagram or in the browser, if the item is a composite element, hyperlink or diagram frame/reference, the target diagram is opened instead).

q.