Re: Quit menu notification with SWT on Mac OS X ?



In article <Patrick.Stadelmann-7AB856.11535316052008@xxxxxxxxxxxxxx>,
Patrick Stadelmann <Patrick.Stadelmann@xxxxxxxx> wrote:

Hi,

I have a GUI java application built with SWT that has a single shell. On
Mac OS X, it is packaged as an application bundle, using the Eclipse
export module "Mac OS X application bundle".

I need to perform some actions before the shell is disposed. I found how
to install a handler for the "close" event, sent when the user's click
on the window's close box. However, if he use the Quit menu in the
standard Mac OS X application menu, I don't get notified.

How can I get notified either when the shell is about to be disposed
(whether is due to the Quit menu or to the window's close box), or when
the Quit menu is invoked ?

Thanks,

Patrick

What version of Eclipse?

You'll need to implement java.awt.event.WindowListener and possibly
com.apple.eawt.ApplicationListener.

The platform will handle Preferences flush().

John
--
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews
.



Relevant Pages

  • Quit menu notification with SWT on Mac OS X ?
    ... I have a GUI java application built with SWT that has a single shell. ... Mac OS X, it is packaged as an application bundle, using the Eclipse ... if he use the Quit menu in the ...
    (comp.lang.java.programmer)
  • Re: How do I delete photographs from an iPad?
    ... shell have to be different. ... the kernel is the same and there is no shell on ios (although ... So you can take the code from an Intel ... powered mac and run it unchanged on an idevice? ...
    (rec.photo.digital)
  • Re: How do I delete photographs from an iPad?
    ... shell have to be different. ... the kernel is the same and there is no shell on ios (although ... So you can take the code from an Intel ... powered mac and run it unchanged on an idevice? ...
    (rec.photo.digital)
  • Re: Running an application more than once
    ... The Mac was introduced in 1984 and was able to run multiple applications ... The shell process just creates a child process, ... It will complicate programming and have no impact on capabilities. ...
    (comp.sys.mac.system)
  • Re: What, exactly, is Apples iPod business model?
    ... and practicing music from all eras, art, literature, and all the rest. ... relevance to comp dot sys dot mac dot apps because the iPod is a ... software system designed in the Mac tradition, ... education, underdeveloped social skills, and poor self-control deal ...
    (comp.sys.mac.apps)