Problem with [SWITCH ... SWITCH]

From: Richard Owlett <rowlett_at_atlascomm.net>
Date: Fri, 27 Sep 2002 14:51:41 -0500

I've modified MAGNIFY.F to read

: DECREASE_MAGNIFICATION ZOOM 10 + TO ZOOM ;
: INREASE_MAGNIFICATION ZOOM 10 - DUP 0> NOT IF DROP 10 THEN TO ZOOM
;

[SWITCH ADJUST_MAGNIFICATION DROP
   43 RUNS INREASE_MAGNIFICATION ; \ + key
   45 RUNS DECREASE_MAGNIFICATION ; \ - key
SWITCH]

[+SWITCH MAG-MESSAGES
   WM_CREATE RUN: HWND 0 50 0 SetTimer DROP 0 ;
   WM_TIMER RUN: MAGNIFY 0 ;
   WM_CLOSE RUN: 0 KillTimer DROP HWND DestroyWindow DROP 0 ;
   WM_CHAR RUN: KEY ADJUST_MAGNIFICATION 0 ;
   WM_LBUTTONDOWN RUN: DECREASE_MAGNIFICATION 0 ;
   WM_RBUTTONDOWN RUN: INREASE_MAGNIFICATION 0 ;
SWITCH]

Everything is fine for mouse clicks.
ANY keypress causes an ABORT.
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe sftalk" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/sftalk -- check them out!
Search the archives! Visit http://www.forth.com/search for details.
Received on Fri Sep 27 2002 - 12:52:22 PDT


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 16-Mar-2010. Archive updated nightly.