5 Jul 22:20
Re: Re: How to catch WindowClosing event in MainFrame ?
Ingo Maier <ingo.maier <at> epfl.ch>
2009-07-05 20:20:20 GMT
2009-07-05 20:20:20 GMT
This has already been fixed in trunk. Ingo Johannes Rudolph wrote: > Looking at the source code, I would guess the problem is, that > MainFrame itself registers a reaction to listen for WindowClosing > which calls System.exit. After this reaction would be called your > reaction would be called -- if the process had not already exited by > then... > > See http://lampsvn.epfl.ch/trac/scala/browser/scala/tags/R_2_7_5_final/src/swing/scala/swing/MainFrame.scala > > On Sun, Jul 5, 2009 at 3:06 PM, qwerky<ukpyr666 <at> gmail.com> wrote: >> Not working : >> >> override def top = new MainFrame { >> val mainFrame = this >> ................................................................. >> listenTo( genStartButton, mainFrame ) >> reactions += { >> case WindowClosing(`mainFrame`) => >> println("Closing") >> } >> peer.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE) >> } >> >> >> WindowActivated, WindowDeactivated, WindowDeiconified working. >> >> -- >> View this message in context: http://www.nabble.com/How-to-catch-WindowClosing-event-in-MainFrame---tp24342133p24342950.html >> Sent from the Scala mailing list archive at Nabble.com. >> >> > > >
RSS Feed