|
From: Wolfgang T. <wth...@us...> - 2006-03-20 06:25:30
|
Update of /cvsroot/hoc/hoc/Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14320/Tests Modified Files: TestFoundation.hs Log Message: Use a (Template Haskell) Name rather than the selector info as a parameter for InstanceMethod, i.e. instead of $(exportClass ... [ InstanceMethod info_foo ]) we now write $(exportClass ... [ InstanceMethod 'foo ]) Most importantly, it is no longer necessary to declare the selectors used in exportClass in a separate file. Index: TestFoundation.hs =================================================================== RCS file: /cvsroot/hoc/hoc/Tests/TestFoundation.hs,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- TestFoundation.hs 17 Mar 2006 05:32:04 -0000 1.8 +++ TestFoundation.hs 20 Mar 2006 06:25:26 -0000 1.9 @@ -10,7 +10,6 @@ import Control.Monad ( when ) import Control.Exception ( try, finally ) -import Selectors -- garbage collect and make really sure that finalizers have time to run performGCAndWait targetCount time maxRepeat = do @@ -47,7 +46,7 @@ $(declareClass "HaskellObjectWithDescription" "NSObject") $(exportClass "HaskellObjectWithDescription" "ho2_" [ - InstanceMethod info_description + InstanceMethod 'description ]) ho2_description self @@ -64,12 +63,15 @@ $(declareClass "ExceptionThrower" "NSObject") +$(declareSelector "throwHaskellException" [t| IO () |]) +$(declareSelector "throwNSException" [t| IO () |]) + instance Has_throwHaskellException (ExceptionThrower a) instance Has_throwNSException (ExceptionThrower a) $(exportClass "ExceptionThrower" "et_" [ - InstanceMethod info_throwHaskellException, - InstanceMethod info_throwNSException + InstanceMethod 'throwHaskellException, + InstanceMethod 'throwNSException ]) et_throwHaskellException self = fail "Test Exception" |