Cirrus CI update, Cocoa compilation fix (hopefully.)

This commit is contained in:
byuu
2019-08-01 03:15:52 +09:00
parent bc7456246c
commit 216b472418
4 changed files with 39 additions and 21 deletions

View File

@@ -5,7 +5,7 @@
-(id) initWith:(hiro::mTableView&)tableViewReference {
if(self = [super initWithFrame:NSMakeRect(0, 0, 0, 0)]) {
tableView = &tableViewReference;
content = [[CocoaTableViewContent alloc] initWithFrame:NSMakeRect(0, 0, 0, 0)];
content = [[CocoaTableViewContent alloc] initWith:tableViewReference];
[self setDocumentView:content];
[self setBorderType:NSBezelBorder];
@@ -126,6 +126,13 @@
@implementation CocoaTableViewContent : NSTableView
-(id) initWith:(hiro::mTableView&)tableViewReference {
if(self = [super initWithFrame:NSMakeRect(0, 0, 0, 0)]) {
tableView = &tableViewReference;
}
return self;
}
-(void) keyDown:(NSEvent*)event {
auto character = [[event characters] characterAtIndex:0];
if(character == NSEnterCharacter || character == NSCarriageReturnCharacter) {

View File

@@ -8,7 +8,7 @@
CocoaTableViewContent* content;
NSFont* font;
}
-(id) initWith:(hiro::mTableView&)tableView;
-(id) initWith:(hiro::mTableView&)tableViewReference;
-(void) dealloc;
-(CocoaTableViewContent*) content;
-(NSFont*) font;
@@ -24,7 +24,9 @@
@end
@interface CocoaTableViewContent : NSTableView {
hiro::mTableView* tableView;
}
-(id) initWith:(hiro::mTableView&)tableViewReference;
-(void) keyDown:(NSEvent*)event;
@end