Book a Demo

Author Topic: How to know the EA tab was closed?  (Read 6756 times)

bachristus

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
How to know the EA tab was closed?
« on: February 08, 2012, 01:56:01 am »
How to know the EA tab was closed? Is there any event I can use to know when user closed my custom tab in EA?

I need to release some resources when tab is closed and I dont know the moment to do this. Have not found any method in (RT)FM! :-)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to know the EA tab was closed?
« Reply #1 on: February 08, 2012, 02:47:35 am »
Won't windoze give you a signal when a resource is closed? (Bare with me, I'm an Apple fanboy.)

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to know the EA tab was closed?
« Reply #2 on: February 08, 2012, 05:27:27 pm »
Could be that one of the standard .Net control events is being triggered, but that is something you would have to test.
I don't think there's an EA specific event that you can use.

Geert

bachristus

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: How to know the EA tab was closed?
« Reply #3 on: February 08, 2012, 06:43:31 pm »
Quote
Could be that one of the standard .Net control events is being triggered, but that is something you would have to test.
I don't think there's an EA specific event that you can use.

Geert

I already tried a few of those. None fired. But i will keep trying  :o

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to know the EA tab was closed?
« Reply #4 on: February 08, 2012, 06:46:52 pm »
Let us know if you find out.
I can imagine I would need that one day as well.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to know the EA tab was closed?
« Reply #5 on: February 09, 2012, 06:42:01 pm »
Long time ago we got the last SPAM....

q.

bachristus

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: How to know the EA tab was closed?
« Reply #6 on: February 10, 2012, 12:40:36 am »
Quote
Let us know if you find out.
I can imagine I would need that one day as well.

Geert

It looks like overriding Control.OnHandleDestroyed() is doing the job!  :o

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to know the EA tab was closed?
« Reply #7 on: February 10, 2012, 12:46:11 am »
Cool, thanks!

Geert

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: How to know the EA tab was closed?
« Reply #8 on: February 10, 2012, 08:54:00 am »
Quote
Long time ago we got the last SPAM....

q.
Yes, it's the first I've deleted in a very long time.
The Sparx Team
[email protected]

Ian E Mitchell

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: How to know the EA tab was closed?
« Reply #9 on: February 14, 2012, 08:32:21 pm »
No - there is no API notification from EA that a tab has been closed. This is a real problem for any add-in writer, as it does mean you have to start diving into some truly nasty bits of Windows. This is what we had to do with our eaDocX Add-in. It would be great if Sparx let us know when a tab goes away....
eaDocX - Document Generator for EA -  http://www.eadocx.com