From: David C. <dw...@dw...> - 2006-11-12 18:21:42
|
> OK, I had to remove the NSView. prefix from the bounds call to get > that line to compile. Did you include the import statement for NSView explicitly? This may also be due to me forgetting to specify the import as qualified... :-) > However, the next line tells me that : > EPView.hs:20:30: Not in scope: `set' > And I'm not sure why it's not in scope because set IS a method of > AppKit.NSColor. This is an exporting issue due to the fact that there are multiple classes in the Cocoa hierarchy which define a "set" selector. In HOC, all selectors are of the same type; for these duplicate selectors there is no way to distinguish which selector you meant by name and type alone, so by default these are not exported. You can either import the module explicitly or import qualified to provide a different namespace for that selector to live: Either: > import AppKit > import qualified AppKit.NSColor as NSColor > ... > blackColor # NSColor.set Or: > import AppKit > import AppKit.NSColor (set) > ... > blackColor # set ---- David Christensen |