WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: popask "NO" values differ in keyboard  (Read 652 times)

Offline PDP-8

  • Sr. Member
  • ****
  • Posts: 469
popask "NO" values differ in keyboard
« on: August 08, 2019, 01:51:45 AM »
TinyCorePure64 10.1 :

If you aren't using a mouse to click on yes / no, but instead are using the return key OR the space key to register a "NO", they return different values.  Use TAB to navigate to "no" button.

Example:

popask using the return/enter key to register a "yes" = 1

popask using the SPACE key to register a "yes" =1

Fine.

Use the TAB key to navigate to NO button.

popask using return/enter to register "no" = 1

popask using SPACE key to register "no" = 0

So, not a showstopper, BUT in the hands of the unskilled who might just actually use the space/return keys instead of a mouse, may result in unintended actions.
« Last Edit: August 08, 2019, 01:54:22 AM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6831
Re: popask "NO" values differ in keyboard
« Reply #1 on: August 08, 2019, 09:34:45 AM »
Hi PDP-8
It seems it's not a bug:
Quote
Description

Displays a printf-style message in a pop-up box with an "Yes" and "No" button and waits for the user to hit a button. The return value is 1
if the user hits Yes, 0 if they pick No or another dialog box is still open. The enter key is a shortcut for Yes and ESC is a shortcut for No.

Note: Common dialog boxes are application modal. No more than one common dialog box can be open at any time. Requests for
additional dialog boxes are ignored.
Found here:
https://www.fltk.org/documentation.php/doc-1.1/functions.html#fl_ask