1 ! Copyright (C) 2005, 2006 Kevin Reid.
2 ! See http://factorcode.org/license.txt for BSD license.
4 USING: assocs kernel namespaces cocoa cocoa.classes
5 cocoa.subclassing debugger ;
9 : reset-callbacks ( -- )
10 H{ } clone callbacks set-global ;
15 { +name+ "FactorCallback" }
16 { +superclass+ "NSObject" }
19 { "perform:" "void" { "id" "SEL" "id" }
20 [ 2drop callbacks get at try ]
23 { "dealloc" "void" { "id" "SEL" }
26 dup callbacks get delete-at
31 : <FactorCallback> ( quot -- id )
32 FactorCallback -> alloc -> init
33 [ callbacks get set-at ] keep ;