It is currently Wed Jan 27, 2021 8:38 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: [Done] enter and escape no longer work in InputRequester
PostPosted: Sun Nov 08, 2020 1:46 am 
Offline
Enthusiast
Enthusiast

Joined: Wed Aug 28, 2019 1:01 pm
Posts: 112
Hi,

Thanks so much for the input requester changes in 5.73 beta 3, but there are two problems:
You can no longer press enter on the edit box to submit/close the requester, which was very useful.
You can tab to the ok button and press space on it and submit it that way, but you can no longer just press enter on the field itself.
You also can't press escape anymore to dismiss/cancel/close the requester.
BTW it would be really nice if there was a way to distinguish between an empty requester being submitted with ok/enter, and requester being dismissed/canceled by closing the window.
Perhaps the requester could return #esc$ when canceled.

Thanks.


Top
 Profile  
Reply with quote  
 Post subject: Re: enter and escape no longer work in InputRequester
PostPosted: Mon Nov 09, 2020 11:02 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14181
Location: France
Fixed. About the cancel detection, if there is an empty string, it probably means it was closed with ESC.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] enter and escape no longer work in InputRequester
PostPosted: Mon Nov 09, 2020 11:07 am 
Offline
Enthusiast
Enthusiast

Joined: Wed Aug 28, 2019 1:01 pm
Posts: 112
Thanks a looot Fred!


Top
 Profile  
Reply with quote  
 Post subject: Re: enter and escape no longer work in InputRequester
PostPosted: Mon Nov 09, 2020 11:38 am 
Offline
Addict
Addict

Joined: Thu Apr 18, 2019 8:17 am
Posts: 1214
Fred wrote:
About the cancel detection, if there is an empty string, it probably means it was closed with ESC.

This has been discussed before. It doesn't mean that necessarily. It could be a prompt with some pre-filled text and the user wants to clear that text (say for a filter). An empty string is just too confusing, and it's why I use my own InputRequester instead.

Is there a major reason it can't return Chr(27) when Esc is pressed or Cancel is clicked? It's then obvious to the coder what happened, and they can act accordingly. Nobody can type Chr(27) by mistake in normal use.

Also, and I've said this before, it needs to bigger and wider for today's HD monitors, because it's really too small to allow meaningful input.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] enter and escape no longer work in InputRequester
PostPosted: Mon Nov 09, 2020 11:40 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14181
Location: France
I did the change to support DPI, so it should work now. About the escape detection, I will see what can be done.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] enter and escape no longer work in InputRequester
PostPosted: Mon Nov 09, 2020 12:00 pm 
Offline
Addict
Addict

Joined: Thu Apr 18, 2019 8:17 am
Posts: 1214
Thank you, Fred. Appreciate it.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] enter and escape no longer work in InputRequester
PostPosted: Mon Nov 09, 2020 12:12 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14181
Location: France
After looking at it, returning ESC keycode when cancelled will break all the current codes as they always test against "". May be a new flag could be added like 'PB_InputRequested_DetectCancel' or something which could return this if it's enabled.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] enter and escape no longer work in InputRequester
PostPosted: Mon Nov 09, 2020 4:24 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Aug 28, 2019 1:01 pm
Posts: 112
That would work.
If you make flags an optional parameter, then code compatibility wouldn't be broken, too, and would allow for more possible flags in the future like preselecting the default text, so it could just be written over without having to manually delete it beforehand, etc.

honestly, any way that would allow differentiating between pressing enter/clicking ok with empty edit box versus canceling/closing the box would be very appreciated at the end of the day.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye