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.
Product Version: NetBeans IDE Dev (Build 201110300600) Java: 1.7.0_01; Java HotSpot(TM) Client VM 21.1-b02 System: Linux version 3.0.0-12-generic-pae running on i386; UTF-8; en_US (nb) User directory: /home/tester/.netbeans/dev Cache directory: /home/tester/.netbeans/dev/var/cache 1.Add two JButtons into JFrame 2.Select first JButton 3.Select Properties-> Events Tab 4.Click on Combobox next to the "actionPerformed" 5.Write: "actionH" NEW EVENT HANDLER IS CREATED 6.Repeat steps 2-5 with second Button So, now you have two JButtons with the same handler. 7.In Properties-> Events Tab delete this handler for first and the for second JButton According to this test spec: #Delete an event handler of a component #If the event handler is the last handler which is attached to the event then a dialog should be shown #You can confirm deleting of the event handler ( including user code - assure it ) or let it be I expect some warning dialog.
The mentioned warning dialog was removed on June 24th 2002. See http://hg.netbeans.org/jet-main/rev/28c3d5815f25 So, congratulation for being the first one after more than 9 years to go through this test specification! The current behaviour (with no warning dialog) is as designed. So, it is the test specification that should be fixed. The possibility to leave the event handler in the code was problematic. It was a piece of code in a guarded block that cannot be removed when it is not attached to any component. Moreover, when the user deletes accidentaly some code that (s)he may need then (s)he can always undo this change.