Initial Commit
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// HP16AppDelegate.m
|
||||
// HPcalc
|
||||
//
|
||||
// Created by Ken on 8/5/08.
|
||||
// Copyright Ken Staton 2008. All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
#import "HP16AppDelegate.h"
|
||||
#import "HP16ViewController.h"
|
||||
#import "DisplayView.h"
|
||||
#import "DisplayView.h"
|
||||
#import "hpcalc.h"
|
||||
#import <AudioToolbox/AudioServices.h>
|
||||
|
||||
|
||||
|
||||
@implementation HP16AppDelegate
|
||||
|
||||
@synthesize window;
|
||||
@synthesize hp16ViewController;
|
||||
@synthesize display;
|
||||
@synthesize calc;
|
||||
|
||||
|
||||
- (void)applicationDidFinishLaunching:(UIApplication *)application {
|
||||
HP16ViewController *aViewController = [[HP16ViewController alloc]
|
||||
initWithNibName:@"ControllerView" bundle:[NSBundle mainBundle]];
|
||||
self.hp16ViewController = aViewController;
|
||||
[aViewController release];
|
||||
|
||||
UIView *controllersView = [hp16ViewController view];
|
||||
|
||||
CGRect frame = CGRectMake(230, 0, 320, 480);
|
||||
|
||||
display = [[DisplayView alloc] initWithFrame: frame];
|
||||
|
||||
[window addSubview:controllersView];
|
||||
[window addSubview:display];
|
||||
//[display displayString:@"42"];
|
||||
|
||||
[window makeKeyAndVisible];
|
||||
|
||||
calc = [[HPCalc alloc] initWithDisplay:display];
|
||||
|
||||
[hp16ViewController calcInstance:calc]; // tell the view controller about this calc instance
|
||||
|
||||
//NSLog(@"done DidFinishLaunch");
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
|
||||
//NSLog(@"awakeFromNib");
|
||||
}
|
||||
|
||||
|
||||
- (void) applicationWillTerminate:(UIApplication *)application {
|
||||
[calc shutdown];
|
||||
//NSLog(@"applicationWillTerminate");
|
||||
}
|
||||
|
||||
|
||||
- (void)dealloc {
|
||||
[display release];
|
||||
[hp16ViewController release];
|
||||
[window release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user