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 29676 - Mnemonic index logic wrong under JDK 1.4
Summary: Mnemonic index logic wrong under JDK 1.4
Status: CLOSED DUPLICATE of bug 26640
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords: JDK_SPECIFIC
Depends on:
Blocks:
 
Reported: 2002-12-20 18:52 UTC by Jesse Glick
Modified: 2008-12-22 19:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Possible patch (6.14 KB, patch)
2002-12-20 18:53 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2002-12-20 18:52:50 UTC
Look at the File menu item Save All. Under either
JDK 1.3 or 1.4 it puts the underscore under the
'a' in "Save". This is wrong; the menu item in the
bundle is listed as:

Save &All

Under JDK 1.3, there is nothing to be done. Under
JDK 1.4, however, we can use
setDisplayedMnemonicIndex. The current logic in
Actions is wrong; it calls sDMI only for non-Latin
characters. It should use it for *all* characters.

There are other potential logic errors in this
area (#26678 patch). The logic to catch linkage
errors in Actions14 is wrong; instantiating the
class *will not* generally throw
NoMethodFoundError under JDK 1.3 (depends on VM
validation settings and so on). You need to
actually try calling the method to determine this.
See my comments in #26678.

Also there is weird code that turns off the
mnemonic in case the strings ends with '&' - what
is this for?

Seems to work as desired for me on Linux under JDK
1.3.1_03 and JDK 1.4.1_01. Needs confirmation on
other platforms, and especially in localized (e.g.
Russian) builds.
Comment 1 Jesse Glick 2002-12-20 18:53:54 UTC
Created attachment 8380 [details]
Possible patch
Comment 2 _ mihmax 2002-12-22 10:06:24 UTC
I can confirm that there really was a piece of bad logic: if
non-Russian, do nothing ;-)

No the patch works for me as Jesse desired on Windows, both English
and Russian builds with JDK 1.3.1 and 1.4.1

Verified.

I think I'll commit this fix into 3.4.1 RC2
Comment 3 _ mihmax 2002-12-22 10:07:58 UTC
No the patch works
~~~ sorry, typpo, should be:
Now works
Comment 4 _ mihmax 2003-02-09 20:34:04 UTC
I'm planning to fix this issue as a part of issue 26640 fix, hence I
close this as a dup.

*** This issue has been marked as a duplicate of 26640 ***
Comment 5 Marian Mirilovic 2003-07-22 14:34:43 UTC
verified, closed - it's duplicate.