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 27001 - Hard-coded mnemonics
Summary: Hard-coded mnemonics
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@projects
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2002-09-04 06:36 UTC by _ mihmax
Modified: 2003-01-21 12:53 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 _ mihmax 2002-09-04 06:36:07 UTC
Found hard-coded mnemonics in the file 

projects/src/org/netbeans/modules/projects/ProjectManagerPanel.java
        newButton.setMnemonic('N');
        importButton.setMnemonic('I');
        importButton.setMnemonic('I');
        saveAsButton.setMnemonic('V');
        deleteButton.setMnemonic('D');
...

Thanks to Tom Ball who discovered
Comment 1 Vitezslav Stejskal 2002-09-04 08:40:24 UTC
OK, what is the problem with hard-coded mnemonics? How do I have to
fix it? Just point me to some spec describing this, if there is any.
Thanks.
Comment 2 _ mihmax 2002-09-04 09:32:58 UTC
> OK, what is the problem with hard-coded mnemonics?
The problem is that noone can localize it ;(

> How do I have to fix it? 
> Just point me to some spec describing this, if there is any.

instead of:
newButton.setText("New"); 
newButton.setMnemonic('N');

use:
org.openide.awt.Actions.setMenuText(newButton,"&New",true);
// where "&New" is got from a bundle

doc: 
 http://www.netbeans.org/devhome/docs/i18n/index.html
 (it's a bit old ;( )

Comment 3 Vitezslav Stejskal 2003-01-09 18:22:22 UTC
fixed in main trunk
org/netbeans/modules/projects/Bundle.properties: 1.59;
org/netbeans/modules/projects/ProjectManagerPanel.form: 1.15;
org/netbeans/modules/projects/ProjectManagerPanel.java: 1.35;
Comment 4 Milan Kubec 2003-01-21 12:53:50 UTC
Verified.