-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNodobo_ReplayAppDelegate.m
45 lines (38 loc) · 1.08 KB
/
Nodobo_ReplayAppDelegate.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// Nodobo_ReplayAppDelegate.m
// Nodobo Replay
//
// Created by Alisdair McDiarmid on 30/07/2010.
// Copyright 2010 Nodobo. All rights reserved.
//
#import "Nodobo_ReplayAppDelegate.h"
#import "Session.h"
@implementation Nodobo_ReplayAppDelegate
@synthesize window;
@synthesize view;
@synthesize controller;
@synthesize tableModel;
@synthesize mapperController;
- (void) applicationDidFinishLaunching: (NSNotification *) notification
{
[self runPanel: self];
}
- (IBAction) runPanel: (id) sender
{
NSOpenPanel * panel = [NSOpenPanel openPanel];
[panel setCanChooseFiles: NO];
[panel setCanChooseDirectories: YES];
[panel setAllowsMultipleSelection: NO];
NSInteger result = [panel runModal];
if (result == NSFileHandlingPanelCancelButton)
return;
NSArray * urls = [panel URLs];
Session * session = [Session sessionWithPath: [[urls lastObject] path]];
[controller setSession: session];
[tableModel setSession: session];
[mapperController setSession: session];
[controller play: nil];
[view resizeWindow];
[window center];
}
@end