Skip to content

Instantly share code, notes, and snippets.

@pkieltyka
Created April 1, 2009 22:48
Show Gist options
  • Save pkieltyka/88930 to your computer and use it in GitHub Desktop.
Save pkieltyka/88930 to your computer and use it in GitHub Desktop.
//
// HWindowController.m
// Haste
//
// Created by Peter Kieltyka on 28/03/09.
// Copyright 2009 NuLayer Inc. All rights reserved.
//
#import "HWindowController.h"
#import "HQueryController.h"
#import "HResultController.h"
@implementation HWindowController
@synthesize queryController, resultController;
-(id) init
{
NSLog(@"init at HWindowController");
if (self = [super initWithWindowNibName:@"HWindow"]) {
[self loadQueryController];
[self loadResultController];
}
return self;
}
-(void) awakeFromNib
{
NSLog(@"awakeFromNib at HWindowController");
}
-(void) loadQueryController
{
NSLog(@"loadQueryController");
queryController = [[HQueryController alloc] initWithSuperController:self];
[queryView addSubview: [queryController view]];
// TODO?: make sure we automatically resize the controller's view to the current window size
//[[myCurrentViewController view] setFrame: [myTargetView bounds]];
}
-(void) loadResultController
{
resultController = [[HResultController alloc] initWithSuperController:self];
[resultView addSubview: [resultController view]];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment