Book a Demo

Author Topic: Event to say EA has closed  (Read 5340 times)

pwhiston

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Event to say EA has closed
« on: December 20, 2006, 05:43:46 am »
Is there an EA event you can hook into to capture that EA has been closed?

thomaskilian

  • Guest
Re: Event to say EA has closed
« Reply #1 on: December 21, 2006, 02:13:52 am »
Yes. Can't recall it at the moment, but AFAIK the example add-in makes use of that.

pwhiston

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Event to say EA has closed
« Reply #2 on: December 21, 2006, 08:42:28 am »
This is an external program rather than an add-in and I want to know when EA has been closed. Will that still work?

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Event to say EA has closed
« Reply #3 on: December 21, 2006, 01:47:59 pm »
There is a broadcast event EA_FileClose which you can intercept. This will tell you when a database has been closed - not quite the same as telling when EA has closed, but there isn't much you can do with EA without having a database open...  :)
« Last Edit: December 21, 2006, 01:48:30 pm by KP »
The Sparx Team
[email protected]

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Event to say EA has closed
« Reply #4 on: December 22, 2006, 07:00:34 am »
My code seems to receive an EA_Disconnect event when EA shuts down. I believe this event can also result from other circumstances, but at least it works here.
No, you can't have it!

thomaskilian

  • Guest
Re: Event to say EA has closed
« Reply #5 on: January 01, 2007, 12:33:59 pm »
Quote
This is an external program rather than an add-in and I want to know when EA has been closed. Will that still work?

Not sure how you need to intercept the closing from an external program. At least you need to have some kind of interface to trigger the according event. From my point of view this is only possible via an add-in.

bittercoder

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
  • .Net developer
    • View Profile
Re: Event to say EA has closed
« Reply #6 on: January 15, 2007, 03:53:27 pm »
If it's your own app, you should be able to control when you close EA just by calling Exit on the repository... and additionally for .Net you would need to force gargbage collection, to be completely sure it's gone...

pwhiston

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Event to say EA has closed
« Reply #7 on: January 16, 2007, 12:36:38 am »
Thanks to everyone for their input. I fear that the exact event that I require is not there but there are always ways!
Bittercoder - my application is not closing EA - it just wants to know when it has closed.

Midnight/KP will experiment with the EA_Disconnect and EA_FileClose.

Thanks again for everyones response