This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 34244 - Selecting "quit" from the NetBeans application menu does not prompt to save modified files, etc.
Summary: Selecting "quit" from the NetBeans application menu does not prompt to save m...
Status: VERIFIED DUPLICATE of bug 39780
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-07 20:52 UTC by rsutphin
Modified: 2008-12-23 09:02 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rsutphin 2003-06-07 20:52:05 UTC
On OS X, if you quit NetBeans from the application menu (the menu called "NetBeans" 
right next to the apple), it seems that none of the shutdown actions are invoked.  
This means that unsaved changes are lost, running processes are abruptly terminated, 
etc.
  
This is also the case if you quit by right- (or control-) clicking on the 
dock icon, press Command-Q, or (most importantly) if NetBeans is running when you 
logout/restart/shutdown.

Environment details:
I have seen this behavior most recently in 3.5RC3 under JDK 1.4.1.  I believe it was there 
in 3.4(.1) as well.  I am pretty sure that it existed under JDK 1.3.1, too, though I haven't 
tested this recently.

Workaround:  quit using File > Exit.

Solution: Apple provides a platform-specific API for receiving the quit events that are 
triggered from the application menu.  See:  

http://developer.apple.com/techpubs/macosx/Java/Java141Development/API-
Apple_Extensions/chapter_12_section_2.html

On the downside, the API changed between JDK 1.3 and JDK 1.4 for OS X.  However, 
supporting at least the 1.4 version would be a nice step forward.
Comment 1 Marian Mirilovic 2003-06-09 08:22:49 UTC
Reasssigne to Tomas for investigaion.
Comment 2 Tomas Hurka 2003-06-27 12:48:32 UTC
I know about this API, but I don't want to add platform specific code into Netbeans code 
base. 
Comment 3 rsutphin 2003-06-27 14:51:58 UTC
I can understand the no-platform-specific code stance, but this is a pretty serious thing 
-- if you log out/restart/shutdown and you have unsaved changes in NetBeans, those 
changes are silently lost.  

At the _very_ least this should be documented in mile-high letters-of-flame in the OS X 
readme and/or FAQ.

(I presume that this doesn't happen on Windows or Linux, though I haven't tried 
recently.  If so, what's the mechanism that they use and why doesn't it work on OS X?  Is 
this another Apple JRE bug?)
Comment 4 Tomas Hurka 2003-07-10 10:00:47 UTC
You are right, I will add it to the NetBeans How to page. 
This problem does not happen on Linux or Windows, since there is no additional Menu, 
where you can select 'Quit NetBeans'. 
Comment 5 Marian Mirilovic 2003-11-26 12:57:20 UTC
Because Window System v1 will not be supported from now by our team, all old
winsys issues (now "core/window system v1" issues) are going to be closed as
WONTFIX. 

Changes in API which emerged both from UI spec 
and problems with adjusting to the older API are described in the document
http://core.netbeans.org/windowsystem/changes.html.
 It shows also recommends how the client code should be adjusted to the new
window system.

If you think this issue apply also to the new winsys then change the
subcomponent (to "core/window system") and REOPEN it.
Comment 6 Marian Mirilovic 2004-02-27 14:10:06 UTC
issue doesn't apply to new window system - verified
Comment 7 Tomas Hurka 2004-03-15 16:07:03 UTC
This issue has nothing to do with new window system.
Comment 8 Tomas Hurka 2004-03-15 16:07:57 UTC

*** This issue has been marked as a duplicate of 39780 ***
Comment 9 Marian Mirilovic 2004-03-16 16:11:38 UTC
verified duplicate