![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

The short answer is that you cannot define one in the class
itself. The definition of CB: is not part of the swoop compiler.
Do you really need it to be defined *in* the class?
Rick
*********** REPLY SEPARATOR ***********
On 3/30/2001 at 3:18 PM Mike Ghan wrote:
>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
-
----------------------------------------------------------------------
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:48:24 PST
This archive was generated by hypermail 2.2.0 : Thu Nov 20 2008 - 03:04:18 PST