Post Reply 
Minor bug in CHOOSE (rev. 6975)
01-16-2015, 02:35 PM
Post: #1
Minor bug in CHOOSE (rev. 6975)
Hello,

The following crashes the Prime:
Code:
KEY K_Menu()
BEGIN
  CHOOSE(N,"Lunch",{"Salad","Yogurt"});
  RETURN "Steak"; 
END;
  1. Press user key [Menu]
  2. Press user key [Menu] again
  3. Cancel selection by tapping outside of choose box
Greetings
Find all posts by this user
Quote this message in a reply
01-16-2015, 04:15 PM
Post: #2
RE: Minor bug in CHOOSE (rev. 6975)
And crashes the emulator, too!

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
01-16-2015, 08:46 PM
Post: #3
RE: Minor bug in CHOOSE (rev. 6975)
Pressing user key [Menu] a third time followed by another key results in
  • either an immediate crash/reboot (e.g. on [Esc] or [Enter])
  • or an endless flickering exclamation mark symbol ([On]+[Symb]-restart needed) (e.g. on [SIN] or [5])
Find all posts by this user
Quote this message in a reply
01-16-2015, 09:05 PM
Post: #4
RE: Minor bug in CHOOSE (rev. 6975)
Guessing the user "choose" is doing something funny and assuming there will never be more then a single choose up at once. I can't see any possible way of actually getting a second one up at a time without going through the user key mechanism though.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
01-16-2015, 10:20 PM (This post was last modified: 01-16-2015 10:54 PM by Snorre.)
Post: #5
RE: Minor bug in CHOOSE (rev. 6975)
Hello Tim,

Therefore I'd call it a minor bug (maybe more an inconvenience) and had never even noticed if I hadn't accidently hit the user key twice and got curious about the second choose box popping up.
I tried the same with an input form, but that rejected to open another one while the first was still open. Also, [View] and [Paste] won't show up while another choose box is waiting. Maybe there's a check that could easily be adapted to user choose boxes too; something similiar to the PPL workaround
Code:
choosing:=0;
EXPORT MYCHOOSE(selection,title,options)
BEGIN
  IF choosing THEN RETURN 0; END;
  choosing:=1;
  CHOOSE(selection,title,options);
  choosing:=0;
  RETURN selection;
END;
(The downside: slightly different semantics and doesn't help with Prime-internal choose boxes)

Greetings
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)