Post Reply 
Latest update kills Entry Mode Switcher
05-01-2016, 04:08 PM (This post was last modified: 05-01-2016 04:10 PM by Tim Wessman.)
Post: #8
RE: Latest update kills Entry Mode Switcher
(04-26-2016 02:53 AM)jgreenb2 Wrote:  Any insight into why the text no longer appears?

The text no longer appears because there was never any code to ensure that the text ever would be visible. When you draw to the screen, you need to either do some sort of wait, or use the FREEZE command to avoid the next screen draw.

I believe that when the inner display loop was cleaned up and improved it was now fast enough that your text basically "disappeared" due to having the next screen draw happen.

Adding FREEZE will make the text stay until you do something else. WAIT can be any value - not just integers. WAIT(.3) would be completely valid.

Since TEXTOUT now returns the last X position "drawn" on the text, you could possibly get unexpected behavior due to evaluating that number as a "key". So now you probably want to return a specific number such as -1 (otherwise you may get an unexpected key executed).

Code:
// Cycles over entry mode options. 
KEY K_On() 
BEGIN 
LOCAL an:={"Textbook","Algebraic","RPN"}; 
Entry:=(Entry+1)MOD3; 

STARTVIEW(-8,1); // Out to ANY AVAILABLE view... 
STARTVIEW(-1,1); // ... and back in, to refresh 

TEXTOUT_P(an(Entry+1),G0,2,207,2,RGB(255,0,0)); 
WAIT(.3); //wait 300ms
-1; // return an invalid key number to ensure nothing else happens
END;

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
Post Reply 


Messages In This Thread
RE: Latest update kills Entry Mode Switcher - Tim Wessman - 05-01-2016 04:08 PM



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