Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!ai-lab!rice-chex!bson From: bson@rice-chex.ai.mit.edu (Jan Brittenson) Newsgroups: comp.sys.handhelds Subject: Re: Soft Keys Application [and LBROWSE example] Keywords: user, key, definitions Message-ID: <11960@life.ai.mit.edu> Date: 19 Nov 90 22:42:02 GMT References: <1448@fs1.ee.ubc.ca> Sender: news@ai.mit.edu Organization: nil Lines: 54 In article <1448@fs1.ee.ubc.ca> jthornto@fs1.ee.ubc.ca (THORNTON JOHAN A) writes: > This is my "Soft Keys" application. Plenty of thanks! This is something I've needed and planned to do myself. Why do you use integer key codes, [BLUE][NXT][BLUE][S] could have a binding different from [BLUE][NXT][S]? > I chose [blue] [NXT] as the hot key; it's not used for anything > anyways. Hmm... mine certainly does something... it moves to the beginning of the current menu, a function that I find quite useful. However, does [BLUE][LIBRARY] do anything? Personally, I never use the interactive stack, and have just picked the [UP] key for SOFT use. Here is an example of LBROWSER usage I have been meaning to post. It displays a list of CHIP games, and when the PLAY key is pressed, the game is run. After play, control is returned to LBROWSER, which redraws the list. It's very simple, it just displays a list of all variables with string values in the current directory, and when you pick one, it's evaluated and fed to the CHIP interpreter. I put them in {HOME GAMES} where I keep my games and such. It can be bound to a SOFT, say [SOFT][G] key as the program << PATH HOME GAMES GAMES EVAL >> which would, ath the stroke of [SOFT][G], display a list of games, and when done, restore the path. Two programs are necessary. GAMES lists the games, and PLAY plays a game. One slight problem, though, is that CHIP won't always run from within a program. That's why I didn't post this example. But after adding BLINKY, it does (for me). It's quite unlikely that it will screw anything up; CHIP will just return immediately. And, oh, turn the clock off. @GAMES: #91E8h Bytes: 83 \<< 2 TVARS { PLAY "" "" "" "" "" } PATH { HOME LBRW LBROWSE } EVAL \>> @PLAY: #8FC2h Bytes: 90 \<< \-> P \<< DUP # 18DBFh SYSEVAL 4 + PICK 2 OVER SIZE SUB OBJ\-> CHIP # 3A1FCh SYSEVAL P 1 \>> \>>