1 ! Copyright (C) 2005, 2006 Kevin Reid.
2 ! See http://factorcode.org/license.txt for BSD license.
7 USING: gadgets hashtables kernel namespaces objc cocoa ;
11 : reset-callbacks ( -- )
12 H{ } clone callbacks set-global ;
16 "NSObject" "FactorCallback" {
17 { "perform:" "void" { "id" "SEL" "id" }
18 [ 2drop callbacks get hash ui-try ]
21 { "dealloc" "void" { "id" "SEL" }
24 dup callbacks get remove-hash
30 : <FactorCallback> ( quot -- id )
31 FactorCallback -> alloc -> init
32 [ callbacks get set-hash ] keep ;