From: Wolfgang T. <wth...@us...> - 2006-03-20 06:25:29
|
Update of /cvsroot/hoc/hoc/Samples/ExpressionParser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14320/Samples/ExpressionParser Modified Files: EPController.hs Removed Files: Selectors.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: EPController.hs =================================================================== RCS file: /cvsroot/hoc/hoc/Samples/ExpressionParser/EPController.hs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- EPController.hs 31 Mar 2005 16:37:59 -0000 1.4 +++ EPController.hs 20 Mar 2006 06:25:26 -0000 1.5 @@ -4,15 +4,16 @@ import Cocoa hiding (parse) import ExpressionParser -import Selectors import Text.ParserCombinators.Parsec (parse) $(declareClass "EPController" "NSObject") +$(declareSelector "evaluateExpression:" [t| forall a. NSButton a -> IO () |]) + $(exportClass "EPController" "ep_" [ Outlet "expressionEntry" [t| NSTextField () |] , Outlet "evaluation" [t| NSTextField () |] - , InstanceMethod Selectors.info_evaluateExpression + , InstanceMethod 'evaluateExpression ] ) --- Selectors.hs DELETED --- |