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 112040 - ACTIONS: Reset to Default doesn't work properly in Action editor
Summary: ACTIONS: Reset to Default doesn't work properly in Action editor
Status: VERIFIED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: App Framework (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-06 12:50 UTC by Jana Maleckova
Modified: 2008-09-05 13:17 UTC (History)
0 users

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 Jana Maleckova 2007-08-06 12:50:14 UTC
Product Version: NetBeans IDE Dev (Build 070806) Java: 1.5.0_12; Java HotSpot(TM) Client VM 1.5.0_12-b03 System: Windows
XP version 5.1 running on x86; Cp1252; en_GB (nb)

Description:
============
have JDA project with two new buttons
1. open AE from action property for jbutton1
2. create new action for this button and close AE
3. open the same AE again and press Reset to Default button
then no action is assigned to jbutton1
4. open AE for jbutton2 from action property as it was done in step 1
5. choose previously created action and press OK
at this time this action is assigned for jbutton2 - correct but for jbutton1 as well - incorrect
Comment 1 Tomas Pavek 2007-09-03 13:50:59 UTC
For some reason the ActionManager tries to update the action for all bound components - and the first button is still
(incorrectly) in the bound components list for the action.
Comment 2 Joshua Marinacci 2007-10-12 15:40:51 UTC
If the user selects 'null' for the action value then setAsText will be called with 'null'. However, if the user selects 'Reset to default', which also sets the action to 
null, it doesn't work. This is because 'Reset to default' doesn't call the setAsText or setValue method on the ActionEditor. Instead, it appears to completely 
bypass the property editor, which means that the ActionEditor code never has a chance to update the values and remove the binding. This makes it almost 
impossible to fix this bug.
Comment 3 Jan Stola 2008-08-12 16:42:07 UTC
Hacked to work.

Modified file: http://hg.netbeans.org/main?cmd=changeset;node=c44409cf8d09
Comment 4 Jana Maleckova 2008-09-05 13:17:15 UTC
verified on

Product Version: NetBeans IDE Dev (Build 20080905031732)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)