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 9691 - allow the user to fix illegal property
Summary: allow the user to fix illegal property
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P3 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords: FOCUS
Depends on: 29447 31896
Blocks:
  Show dependency tree
 
Reported: 2001-02-20 00:28 UTC by Rochelle Raccah
Modified: 2008-12-22 20:48 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rochelle Raccah 2001-02-20 00:28:47 UTC
After entering an illegal property value, the focus should be brought back to
the text (in the property sheet) afterwards  I would think the correct behaviour
would be:

- User enters an invalid text string
- An error dialog is shown
- User hits okay
- Focus goes back to the propert sheet with the (bad?) text highlighted
- The user can change it and try again, or escape or something to discard

See related bug 9631
Comment 1 David Strupl 2001-02-20 09:27:24 UTC
Try uncommenting line 755 in PropertyDisplayer and test. It will probably
work ok only when hitting Enter. A way to make it work also after the user
clicks on another property has to be found.
Comment 2 Jan Chalupa 2001-05-06 08:13:56 UTC
Target milestone -> 3.3
Comment 3 Rostislav Levy 2001-06-05 15:54:53 UTC
Reasign
Comment 4 Jan Chalupa 2001-11-27 13:04:01 UTC
Target milestone -> 3.3.1.
Comment 5 David Simonek 2002-02-05 14:13:22 UTC
Important, but beware, impl will be probably *very tricky*, count with it.
Comment 6 Marek Grummich 2002-07-22 11:20:45 UTC
Set target milestone to TBD
Comment 7 Marek Grummich 2002-07-22 11:22:57 UTC
Set target milestone to TBD
Comment 8 Jiri Rechtacek 2002-07-29 16:39:40 UTC
This can be partly resolved by implementation 17184.
Comment 9 Ann Sunhachawee 2002-12-03 23:12:25 UTC
I feel this is a bug because user expects that a value should change.
Error dialogs should pop up in context and give the user a chance to
resolve the issue.  Currently, the user is being presented with the
equivalent of "This is a wrong value. Too bad. You can't change it
unless you go back and track it down yourself." It's like the IDE is
half heartedly trying to help the user.

Note, that all the other major IDEs do not allow user to leave a node
unless they correct the value. For example, .NET does not do this.
Eclipse simply doesn't allow user to change properties.

BTW, I don't see how bug 17184 affects this bug, unless i
misunderstand. Does "implementation 17184"  refer to issuezilla 17184
or not?
Comment 10 _ tboudreau 2003-04-17 14:22:33 UTC
Adding to property sheet rewrite umbrella.
Comment 11 _ tboudreau 2003-07-16 19:43:17 UTC
Note this is not yet fixed with property sheet rewrite, but
should be comparatively easy - add a boolean return value
from PropUtils.updateProp() and don't close the editor if
it returns false.
Comment 12 _ tboudreau 2003-10-15 21:47:04 UTC
I just took enough of a stab at implementing this to find out that 
it will be more work than I thought, even in the new property sheet -
 so I'm just adding some notes on what to do while it's fresh in my 
mind:

 - Migrate away from a shared cell editor for all instances of 
SheetTable
 - Modify PropUtils.updateProp to take a WindowListener argument
 - Implement that on SheetTable, and once we're creating cell editors
   per table, the cell editor can know which SheetTable invoked it,
   and use it as a windowlistener to pass

The problem is that the code that displays the dialog (which I more
or less reused unmodified from the old property sheet) returns 
immediately, briefly setting focus to the property sheet as it
removes its editor, then the dialog pops up.  

I could probably do a horrible hack and re-initiate editing after 
two focusGained events have been received following a failed edit,
but that's a bit too likely to fail for my taste.  Better to do it
correctly.
Comment 13 _ tboudreau 2003-10-24 10:01:12 UTC
Fixed on the property panel rewrite branch
Comment 14 _ tboudreau 2003-12-09 09:36:43 UTC
Property panel rewrite branch merged.