Author Topic: Fired Event When Click Root/Model Node  (Read 2746 times)

putrigmail

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Fired Event When Click Root/Model Node
« on: September 19, 2012, 12:45:47 am »
Hi all,

I use EA_OnContextItemChanged to handle event when user clicks an object (package/element/diagram). However, it is not fired up when user clicks Root/Model node (while it works with other packages).
Is there any other way to handle clicking Root/Model node?

Thanks :)

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: Fired Event When Click Root/Model Node
« Reply #1 on: September 19, 2012, 02:52:46 am »
I don't think there is a way to do that: there are no events that get fired when clicking on a root node and there is no other way to trap a user click event in EA.

The best you can achieve is to use the EA_GetMenuItems event to define a popup submenu below 'extensions' and react to a click event on that. Use Repository.GetTreeSelectedPackage().name to retrieve the name of the selected package, this works for root nodes as well.

putrigmail

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Fired Event When Click Root/Model Node
« Reply #2 on: September 19, 2012, 04:11:01 pm »
Thank you for your answer   ;). It is strange why there's no direct event to handle root node.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Fired Event When Click Root/Model Node
« Reply #3 on: September 19, 2012, 04:18:57 pm »
Send in a bug report. I don't see any good reason not to fire the event, so it is probably just a bug.

Geert