Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
We propose to implement a two stage process. Stage 1 We check each key pressed for valid input. For example, we ignore letters and symbols (except '.') if we are typing into a numeric field. There will be a special case for properties such as fx:id where we allow numbers, characters and symbols that are valid for the fx:id syntax. Stage 2 (special case for properties such as fx:id and controller class) On submit and loss of focus we do a final check for valid input. By valid input we mean "a value that can be saved to the document". If the value is invalid then we show a dialogue with a warning and 2 buttons: "Discard Change" and "Fix it" (default). The item focus is persisted on the value editor. If the user chooses "Discard Change" then the previous value is restored in the value editor. The following scenario would use stage 2. The user could edit a value for fx:id by using the delete key and submit the value, not knowing it was a duplicate id. As no characters were typed, stage 1 error checking was never used. Hence stage 2 dialogue provides a fallback. In the corner case where a menu command is chosen while invalid input is inside the focused editor, we do the following. - allow the menu item to be selected - check if the menu item will modify or save the document and if so, abort the menu command and show the dialog in stage 2.
|