diff options
| author | Pietro Gagliardi <[email protected]> | 2014-05-16 09:13:11 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-05-16 09:13:11 -0400 |
| commit | a9717bfb4fd6627d51dfc07c35f393f0a93368ff (patch) | |
| tree | e9b2eaa2c979f45a829187343676fc5efae02eff /objc_darwin.m | |
| parent | acc4a543566550ed563887a5827735596a5d816c (diff) | |
Organized the dummyRect declarations/definitions/etc. in the Objective-C files. I think that's it for the Objective-C conversion of the Mac OS X code!
Diffstat (limited to 'objc_darwin.m')
| -rw-r--r-- | objc_darwin.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/objc_darwin.m b/objc_darwin.m index 08113b6..09c2ec2 100644 --- a/objc_darwin.m +++ b/objc_darwin.m @@ -10,6 +10,9 @@ #define toNSView(x) to(NSView, (x)) #define toNSScrollView(x) to(NSScrollView, (x)) +// because the only way to make a new NSControl/NSView is with a frame (it gets overridden later) +NSRect dummyRect; + id toNSString(char *str) { return [NSString stringWithUTF8String:str]; @@ -43,7 +46,7 @@ id makeScrollView(id content) NSScrollView *scrollview; scrollview = [[NSScrollView alloc] - initWithFrame:NSMakeRect(0, 0, 100, 100)]; + initWithFrame:dummyRect]; [scrollview setHasHorizontalScroller:YES]; [scrollview setHasVerticalScroller:YES]; [scrollview setAutohidesScrollers:YES]; |
