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 183286 - Size field content of Add Column dialog affects other field
Summary: Size field content of Add Column dialog affects other field
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords: NETFIX, UI
Depends on:
Blocks: 183285
  Show dependency tree
 
Reported: 2010-03-31 14:30 UTC by Michael Nazarov
Modified: 2012-10-03 02:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch v1 (4.03 KB, patch)
2012-09-29 21:24 UTC, matthias42
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Nazarov 2010-03-31 14:30:52 UTC
Steps to reproduce:

1. Open add column dilaog.
2. Select VARCHAR as column type.
3. Start entering size into Size field.

Scale filed size will be affected during typing.
Comment 1 Michael Nazarov 2010-03-31 14:32:05 UTC
Correction:

Step 2 should be: enter name.
Column type doesn't matter.
Comment 2 Jiri Rechtacek 2010-04-27 13:54:52 UTC
Rewrite AddTableColumnDialog will be the best.
Comment 3 matthias42 2012-09-29 21:24:25 UTC
Created attachment 125107 [details]
proposed patch v1
Comment 4 matthias42 2012-09-29 21:25:47 UTC
The attached patch fixes the size issue for me, as I was in the file, I also added an input verifier, which enforces scale and size to be numeric.
Comment 5 Jaroslav Havlin 2012-10-02 12:50:35 UTC
> The attached patch fixes the size issue for me.
http://hg.netbeans.org/core-main/rev/e391df16568d
Great! Thank you!

> As I was in the file, I also added an input verifier, which enforces scale
> and size to be numeric.
I find this type of validation quite unintuitive. If you leave the column name empty and fill size field incorrectly, you get locked in the field and you do not know why (because the info message says "Provide valid column name").

Also changing column type while scale is filled incorrectly can lead to invalid state (focus locked in field scale, which is disabled).

Of course both issues can be fixed, but I think that disabling OK button and showing an info message is sufficient. InputVerifiers are not used in the IDE as I know, so I am afraid it would make the dialog inconsistent and less intuitive.

If such change should be applied, I would also do it rather before beta release.
What do you think?
Comment 6 matthias42 2012-10-02 16:04:28 UTC
You are right - especially the "should be before beta" part. I missed that netbeans nears release :-)

Thanks for applying and the heads up!
Comment 7 Quality Engineering 2012-10-03 02:41:20 UTC
Integrated into 'main-golden', will be available in build *201210030002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e391df16568d
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #183286: Size field content of Add Column dialog affects other field