added .gitignore converted from svn:ignore
[TestXSLT.git] / src / AppDelegate.m
1 //
2 //  NSDocumentControllerNotificationCategory.m
3 //  TestXSLT
4 //
5 //  Created by Marc Liyanage on Sat Mar 29 2003.
6 //  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
7 //
8
9 #import "AppDelegate.h"
10 #import <Foundation/NSDebug.h>
11
12 @implementation AppDelegate
13
14
15 - (id)init {
16
17         self = [super init];
18         if (!self) return nil;
19
20         NSZombieEnabled = YES;
21
22         NSString *templateXML = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"template" ofType:@"xml"]];
23         NSString *templateXSLT = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"template" ofType:@"xslt"]];
24         NSLog(@"AppDelegate init");
25     NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:
26                 @"YES", @"enableWellformedCheck",
27                 @"YES", @"enableSyntaxAnalysis",
28                 templateXML, @"templateXML",
29                 templateXSLT, @"templateXSLT",
30                 nil];
31     [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults];
32                 
33         return self;
34         
35 }
36
37
38 - (void)applicationWillTerminate:(NSNotification *)aNotification {
39         [prefsWindow orderOut:self];
40 }
41
42
43 @end