From: <wo...@bi...> - 2004-07-12 21:40:02
|
I thought to try to make a screen using the screen package. The documentation says to use ext:with-keyboard for input. I'm trying to write a simple menu system with the following code: (setf *main-win* (screen:make-window)) (setf *cust-name* "CST") (setf menu-x 20) (screen:clear-window *main-win*) (screen:set-window-cursor-position *main-win* 0 31) (format *main-win* "M A I N M E N U") (screen:set-window-cursor-position *main-win* 1 38) (format *main-win* "~a" *cust-name*) (screen:set-window-cursor-position *main-win* 3 menu-x) (format *main-win* "1. Add traffic source") (screen:set-window-cursor-position *main-win* 4 menu-x) (format *main-win* "2. Remove traffic source") (screen:set-window-cursor-position *main-win* 5 menu-x) (format *main-win* "3. Toggle bill cycle process flag") (screen:set-window-cursor-position *main-win* 6 menu-x) (format *main-win* "4. Toggle customer has traffic flag [~a]" "true") (do () (nil) (ext:with-keyboard . (cond ((string= "q" (read ext:*keyboard-input*)) (return)) ((string= "Q" (read ext:*keyboard-input*)) (return))))) however, I'm getting the error: *** - SYSTEM::%EXPAND-FORM: (STRING= "q" (READ *KEYBOARD-INPUT*)) should be a lambda expression Can someone help me out with how this should be coded or maybe some documentation to read? (I've been using http://clisp.cons.org/impnotes/terminal.html and http://clisp.cons.org/impnotes/screen.html for reference) Thanks, -- Jeff |