Bug 31086 - Focus should be on Name field in 2nd panel of New wizard
Focus should be on Name field in 2nd panel of New wizard
Status: VERIFIED FIXED
Product: platform
Classification: Unclassified
Component: Dialogs&Wizards
3.x
All All
: P3 (vote)
: 3.x
Assigned To: Jiri Rechtacek
issues@platform
: A11Y, FOCUS
: 29592 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-14 20:54 UTC by Jesse Glick
Modified: 2008-12-22 21:49 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2003-02-14 20:54:31 UTC
Has been broken for a while, but has been annoying
me so much I had to file it.

[dev feb 13, MDI, Linux, Gnome + Sawfish, JDK
1.4.1] Open New wizard, e.g. Ctrl-N. Select some
template (e.g. Java Class) with arrow keys. Press
Enter. In 2nd wizard panel, the "Back" button (of
all things) has focus. You have to remember to
press Alt-N to get to the Name field, which is
where you always want to start out (and often finish).

TemplateWizard2.requestFocus is apparently trying
to do just this, but it does not work for me. This
is a regression from NB 3.4.1. I notice that
requestFocus() is gone from readSettings between
1.42 and 1.43 (wizards_redesign_2002Sep merge).
Comment 1 Jiri Rechtacek 2003-02-17 19:26:09 UTC
[Feb 17 dev] [Linux, Gnome, Sawfish] It works for me, the Enter
navigates me Next->Next->Finish. I can add requestFocus() back to
TemplateWizard2.implReadSettings() but w/o effect I think.
Shouldn't be the mnemonic 'n' reserved by Next button in place on Name
in 2nd panel? Or is it really wanted? If the Next/Finish button
requests the focus in WizardDescriptor on updateState method that the
button takes up the focus from TargetChooser or TemplateChooser but it
is bad, isn't? I will discuss it with Marek S as focus expert.
Comment 2 Jesse Glick 2003-02-17 23:18:51 UTC
I think you missed the point completely.

Again, I've selected a template and pressed Enter. This correctly
takes me to the 2nd wizard panel.

Now what do I want to do? Enter a name for the class, of course. Yet
focus is on the "Back" button. (Of course Enter goes forward, as it
should - I don't *want* to go forward, because there is no name for
the class yet!) In order to put focus into the "Name" field so I can
type a name, I have to press Alt-N (the mnemonic for the "Name" field,
and please please do not remove that too!). This is wrong.

The behavior in 3.4.1 is correct: as soon as you enter the 2nd panel,
KB focus is in the "Name" field (and the text "<default name>" is
selected so you can immediately begin typing a name without having to
first delete that). After typing a name, you can press Alt-F to finish
at once, or Enter to go on to a subsequent panel (less frequent).

Try making 20 new classes (each with different names!) without
touching the mouse and you will see that this is pretty annoying. The
desired behavior is as in 3.4.1 before the regression:

1. Select a folder in the Explorer.
2. Ctrl-N to open wizard.
3. Focus is in template chooser. Use arrow keys to select a template.
4. Enter to move to second panel.
5. Focus is in Name field, and default text is selected. Type a name.
6. Alt-F to finish and create the file.

Current wizard requires an extra step:

4.5. Press Alt-N.

BTW: no, "Next" should not have a mnemonic - HIE confirmed that when a
button is the default button in a dialog, it should have no mnemonic.
Comment 3 Jiri Rechtacek 2003-02-18 10:15:35 UTC
Jesse, thanks for clarification. I'll push for be solved to nb35.
Comment 4 Marian Mirilovic 2003-02-19 16:02:24 UTC
Jirka, this is regression against 3.4. 
Comment 5 _ tboudreau 2003-02-24 11:34:38 UTC
May be related to the fix for issue 29195.  Jesse, what JDK are you
using?  There was a focus issue that involves hacking the focus only
for 1.4.0 (used to be for >= 1.4), which may be related - the 1.4.0
fix was causing focus to be set fairly randomly (so the container
didn't end up with focus by accident), while the default behavior
(no explicit focus wizardry) works on 1.4.1.
Comment 6 _ tboudreau 2003-02-24 11:37:17 UTC
Also:  Why does the wizard allow you to go forward with an illegal
(and useless) name such as <default name>?  Doesn't seem like 
appropriate behavior.
Comment 7 _ tboudreau 2003-02-24 14:21:21 UTC
Fixed in trunk, org.openide.loaders.TemplateWizard2 1.68

Also removed workaround for some (circa JDK 1.2?) ancient problem
selecting the contents of the field on Solaris - works fine now
on both 1.3 & 1.4.
Comment 8 Jesse Glick 2003-02-24 16:39:59 UTC
I use JDK 1.4.1_01.
Comment 9 Jiri Rechtacek 2003-02-24 16:40:26 UTC
*** Issue 29592 has been marked as a duplicate of this issue. ***
Comment 10 Jesse Glick 2003-02-24 21:17:30 UTC
Uh...

1. It is still broken for me (updated CVS an hour or so ago).

2. There is no TemplateWizard2.java 1.68, and you have never committed
to this class.

3. There is a TemplateWizard.java 1.68. But the log message does not
sound related:

revision 1.68
date: 2003/02/17 15:23:20;  author: jrechtacek;  state: Exp;  lines:
+70 -24
impl issue #27791, the wait cursors are now used on Back/Next actions
and Finish action

So why was this marked fixed?

Re. "Why does the wizard allow you to go forward with an illegal
(and useless) name such as <default name>?" - it just uses the default
name for the template, e.g. creates Class.java for "Java Classes ->
Java Class"; not actually "<default name>" which of course is illegal.
I suppose this could be a "feature" - you don't have to specify a name
for a template - but I think it's pretty dumb too (you *always* want
to specify a name, IMHO) and would be happy if the Next/Finish button
were just disabled until you typed something.
Comment 11 Jiri Rechtacek 2003-02-25 07:35:32 UTC
Jesse, I haven't fixed it the state changed Tim (w/o assigned to
himself) It tried it and really wasn't fixed yet. I will settle with
Tim who will work on it.
Comment 12 _ tboudreau 2003-02-25 10:43:06 UTC
Looks like my commit yesterday didn't commit :-(
It's there now.

Correct version:  TemplateWizard2.java 1.53
Comment 13 Jesse Glick 2003-02-26 14:35:55 UTC
Yes, it seems to be working now, thanks!


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo