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 129804

Summary: "Dimensions" dialog does not display warning for the second time
Product: platform Reporter: Petr Dvorak <joshis>
Component: Property EditorsAssignee: Stanislav Aubrecht <saubrecht>
Status: REOPENED ---    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Petr Dvorak 2008-03-11 16:27:05 UTC
Product Version: NetBeans IDE Dev (Build 200803110005)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.2 running on i386; MacCentralEurope; cs_CZ (nb)

Click ellipsis (...) button by some property of a "dimension" type (for example maximumSize of the JPanel). Dialog shows up. Type "hello" to the "width" field 
and click OK. You will get an error message. Click OK again (or type "Hello world" in the "width" field and click OK then). A dialog is closed, dimensions 
remained as if a user clicked Cancel button.

A warning dialog should be displayed whenever a user tries to click OK and the values are incorrect.
Comment 1 Marian Petras 2008-03-11 17:09:21 UTC
Reassigned to component "form".
Comment 2 Jan Stola 2008-03-12 11:30:57 UTC
DimensionEditor resides in core => reassigning.
Comment 3 Denis Anisimov 2008-03-13 13:01:16 UTC
changeset:   72922:7fba419ecce4
Comment 4 Petr Dvorak 2008-04-01 12:49:00 UTC
I am sorry to reopen this issue, I would like to propose a small enhancement concerning the validation (it is
ENHANCEMENT and I didn't want to open a new issue for it).

First I have to warn you that it is a purely QA stuff, don't beat me:o). We will now try to avoid the validation on purpose:

Open the Dimension property dialog again (see the 1st description). Go to "width" field, place the caret to the end of
the value (for example: "width: 0|" where '|' stands for a caret). Move a mouse cursor over the button OK. Press "a" and
click the left mouse button right after you pressed "a". You have now entered value "0a" and you managed to click the OK
button before the validation was made. A dialog "Error: Invalid value entered" appears. Click OK in this dialog. The
incorrect value now resides in the dialog, button OK remains enabled, you can confirm the incorrect value.

I would suggest following:

- remove the error dialog as there is currently better validation (if it is possible)
- then force the validation whenever the change event is fired on the field (onchange?, onkeypress?)
- add validation to the OK button click event. If you click the OK button and the value is incorrect, the OK button will
be disabled, property dialog will remain opened and no error dialog appears - as if user clicked already disabled button
(it is cheating, I know...)
Comment 5 Lukas Hasik 2008-04-10 21:22:48 UTC
moving opened issues from TM <= 6.1 to TM=Dev