Update of /cvsroot/hoc/hoc/Samples/Browser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14320/Samples/Browser
Modified Files:
BrowserController.hs TVUtilities.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: TVUtilities.hs
===================================================================
RCS file: /cvsroot/hoc/hoc/Samples/Browser/TVUtilities.hs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- TVUtilities.hs 27 Jul 2005 02:52:21 -0000 1.3
+++ TVUtilities.hs 20 Mar 2006 06:25:26 -0000 1.4
@@ -63,9 +63,9 @@
InstanceVariable "theData" [t| WrappedTVData |]
[| undefined |],
- InstanceMethod info_init,
- InstanceMethod info_numberOfRowsInTableView,
- InstanceMethod info_tableViewObjectValueForTableColumnRow
+ InstanceMethod 'init,
+ InstanceMethod 'numberOfRowsInTableView,
+ InstanceMethod 'tableViewObjectValueForTableColumnRow
])
sds_init self = do
--- Selectors.hs DELETED ---
Index: BrowserController.hs
===================================================================
RCS file: /cvsroot/hoc/hoc/Samples/Browser/BrowserController.hs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- BrowserController.hs 3 Mar 2004 14:10:51 -0000 1.3
+++ BrowserController.hs 20 Mar 2006 06:25:26 -0000 1.4
@@ -5,8 +5,6 @@
import Data.Array
import Data.List ( isPrefixOf, elemIndex, sort )
-import Selectors
-
frameworks = ["Foundation", "AppKit"]
data SelInfo = SelInfo {
@@ -26,6 +24,8 @@
$(declareClass "BrowserController" "NSObject")
+$(declareSelector "sideBarSelection:" [t| forall a. NSTableView a -> IO () |])
+
$(exportClass "BrowserController" "bc_" [
Outlet "sideBarDataSource" [t| SimpleTVDataSource () |],
Outlet "sideBarTableView" [t| NSTableView () |],
@@ -34,8 +34,8 @@
InstanceVariable "allSelectors" [t| [SelInfo] |] [| [] |],
- InstanceMethod info_awakeFromNib,
- InstanceMethod info_sideBarSelection
+ InstanceMethod 'awakeFromNib,
+ InstanceMethod 'sideBarSelection
])
mkArray xs = listArray (0, Prelude.length xs - 1) xs
|