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 65246

Summary: missed event object name
Product: guibuilder Reporter: mazzuco <mazzuco>
Component: CodeAssignee: issues@guibuilder <issues>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P4    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: the source that generates the errors.

Description mazzuco 2005-09-28 10:41:07 UTC
I'm trying to create a toolbar with a button inside. When i create an action
event for the button, using the visual editor, it creates the follows wrong code:

   jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent ) {
                jButton1ActionPerformed();
            }
        });

(missing the ActionEvent name)

If i build, i obtain these errors

init:
deps-jar:
Compiling 1 source file to C:\IvyProject\build\classes
C:\IvyCon\IvyProject\src\gui_ip\Design.java:108: <identifier> expected
            public void actionPerformed(java.awt.event.ActionEvent ) {
C:\IvyCon\IvyProject\src\gui_ip\Design.java:111: ')' expected
        });
C:\IvyCon\IvyProject\src\gui_ip\Design.java:127: <identifier> expected
    private void jButton1ActionPerformed(java.awt.event.ActionEvent )
{//GEN-FIRST:event_jButton1ActionPerformed
C:\IvyCon\IvyProject\src\gui_ip\Design.java:133: ')' expected
    private javax.swing.JPanel dash;
4 errors
BUILD FAILED (total time: 0 seconds)
Comment 1 mazzuco 2005-09-28 10:42:44 UTC
Created attachment 25251 [details]
the source that generates the errors.
Comment 2 mazzuco 2005-09-28 10:51:45 UTC
founded the problem: the "evt" variabile name was "blanked" on the option session.
I don't know why, the only operation i've done on the options was changing the
flatten representation of the packages to the tree version.
I've retried to reproduce the anomalous behaviour, but it seems to work now, so
i've lowered the priority of the issue
Comment 3 Jan Stola 2005-10-21 16:52:34 UTC
Fixed. The reproducible scenario was:

1. Restart the IDE.
2. Open Options dialog - General tab is displayed.
3. Don't do anything in the dialog (even, don't select new tabs),
   just press OK. => the event variable name is cleared (in form options).

/cvs/form/src/org/netbeans/modules/form/FormEditorPanelController.java,v
new revision: 1.3; previous revision: 1.2
Comment 4 Jan Stola 2005-10-31 17:47:50 UTC
*** Issue 67858 has been marked as a duplicate of this issue. ***
Comment 5 Marek Grummich 2006-01-19 10:44:39 UTC
Verified.
Comment 6 Jiri Prox 2006-07-27 09:10:09 UTC
*** Issue 81220 has been marked as a duplicate of this issue. ***