summaryrefslogtreecommitdiff
path: root/area_darwin.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-30 13:21:10 -0400
committerPietro Gagliardi <[email protected]>2014-03-30 13:21:10 -0400
commit8f944c7ec6ba0efaa6dd649934bc2badaef5ab22 (patch)
treefb68e290da74f0c8f964f6fe3ed996eb49f64194 /area_darwin.go
parent08dfb5da2034c33b68d7247dd16925960b3b88a3 (diff)
When we created our delegate and view classes on Mac OS X, it turned out we were accidentally subclassing the metaclass (of NSObject and NSView, respectively), not the actual superclass itself. Fixed tha. This also fixed that mysterious objc_new()/[object init] not working on the delegate class problem.
Diffstat (limited to 'area_darwin.go')
-rw-r--r--area_darwin.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/area_darwin.go b/area_darwin.go
index a767411..ecefc76 100644
--- a/area_darwin.go
+++ b/area_darwin.go
@@ -64,10 +64,8 @@ func areaInScrollView(scrollview C.id) C.id {
func makeArea(parentWindow C.id, alternate bool) C.id {
area := objc_alloc(_goArea)
-println(area)
area = objc_msgSend_rect(area, _initWithFrame,
0, 0, 100, 100)
-println("out")
// TODO others?
area = newAreaScrollView(area)
addControl(parentWindow, area)
@@ -78,7 +76,7 @@ println("out")
var (
_NSView = objc_getClass("NSView")
- _NSView_Class = C.object_getClass(_NSView)
+ _NSView_Class = C.Class(unsafe.Pointer(_NSView))
)
func makeAreaClass(name string) (C.Class, error) {