PDA

View Full Version : Request to add missing Escape key to various GUI control classes



Allan Greis Eriksen
24-Mar-2015, 01:16 PM
Some GUI control classes like the CheckBox does not understand the Escape key. So if a user has focus on a GUI control that does not embed the Escape key the view or form acts nonresponsive to the user ie. he wants to close the dialog but can't.


On_Key key_escape Send request_cancel
or maybe Close_panel is better than request_cancel since the controls are not db aware.

The GUI controls I would like to have embedded the Escape key are:

Button
CheckBox
CjGrid
ComboForm
Container3d
Group
Radio
RadioGroup
RichEdit
SpinForm
TabDialog
TabPage
Textbox
TextEdit
TreeView

Gregg Finney
24-Mar-2015, 01:51 PM
We sub-classed most of these, and put the On_Key kCancel in.

Allan Greis Eriksen
24-Mar-2015, 01:52 PM
We have done that also. Precisely my point on why it should be in the native classes :)

Gregg Finney
24-Mar-2015, 01:56 PM
Maybe a property to add this behavior would be a good idea.

Garret Mott
24-Mar-2015, 02:39 PM
A property that defaults to the Esc key working IMO. Imagine a newbie trying to figure something like this out. It's little things like this that really turn off new users (I've watched it happen). While we say "Subclass it", they say "Something this basic doesn't work? How can I trust this language?".

[end soapbox]

Gregg Finney
24-Mar-2015, 02:46 PM
Who said that would be a default. It should default to false. Have you looked at a cCJGrid stuff lately, there's enough stuff in there to make a newbie cry. Anyways it's never gonna happen.

Bob Worsley
24-Mar-2015, 02:48 PM
Gee, sounds like everyone is looking for consistency... :D Sound familiar Garret?

Garret Mott
24-Mar-2015, 03:19 PM
Who said that would be a default. It should default to false. Have you looked at a cCJGrid stuff lately, there's enough stuff in there to make a newbie cry. Anyways it's never gonna happen.

Well - (once again IMO) if DAW doesn't clean up this sort of thing, DF will never get accepted as a viable alternative to other languages.

Garret Mott
24-Mar-2015, 03:19 PM
Uh oh! I see hobgobins!

Allan Greis Eriksen
25-Mar-2015, 03:37 PM
Agreed. Web or NoWeb ;)

Dennis Piccioni
14-Apr-2015, 03:19 PM
Hi Allan,

logged as bug # 6811.

Todd Forsberg
14-Apr-2015, 05:42 PM
Have you looked at the .NET classes? The CJ control is tiny by comparison of the many .NET classes/libraries. Newbies still use it. Good classes should have a good API/interface and hide the complexities.

Peter Crook
16-Apr-2015, 05:24 AM
Wouldn't this be non-standard Windows behaviour? Should the escape key close only modal dialogs?

Dennis Piccioni
16-Apr-2015, 12:50 PM
Perhaps, but it already does close views for the most common controls and the bug was the behavioral inconsistency between controls.

Whether it should do that is another question. My personal opinion is yes, probably because it's done that for so long.