programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Callback in a Class

From: Mike Ghan <mikeghan_at_logix-controls.com>
Date: Fri, 30 Mar 2001 15:18:59 -0800

What is the proper (if any) way to define a callback inside of a CLASS?

CLASS PRT-FOO

        VARIABLE ABORT-PRINT?

        \ Classic Printer Abort Procedure
        :NONAME ( hDCprt error -- flag ) \ True = Continue
           2DROP ( hDC error )
           BEGIN WINMSG 0 0 0 PM_REMOVE :: PeekMessage
           WHILE DISPATCH
           REPEAT ABORT-PRINT? @ NOT ;
           2 CB: ABORTPROC

        : SET-ABORT-PROC
           PRT-DC ABORTPROC :: SetAbortProc DROP ;

END-CLASS

Best Regards, Mike Ghan mikeghan_at_logix-controls.com

Logix Industrial Control Systems http://www.logix-controls.com
10518 NE 68th St
Kirkland, WA 98033 USA
(425)828-4149 (425)828-9682 Fax
----------------------------------------------------------------------
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!
Received on Fri Mar 30 2001 - 15:21:03 PST

This archive was generated by hypermail 2.2.0 : Thu Nov 20 2008 - 03:04:18 PST