forked from robrohan/WebArchiveExtractor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OutputTypeController.m
82 lines (68 loc) · 1.85 KB
/
OutputTypeController.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//
// OutputTypeController.m
// WebArchiveExtractor
//
// Created by Rob Rohan on 10/8/07.
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
#import <WebKit/WebKit.h>
#import "OutputTypeController.h"
#import "OutputType.h"
@implementation OutputTypeController
- (id) init
{
[super init];
outputTypeList = [[NSMutableArray alloc] init];
//setup all the basic types
OutputType * tmp = [[OutputType alloc] init];
[tmp setDisplayText: @"XML"];
[tmp setDocumentContentKind: NSXMLDocumentXMLKind];
[outputTypeList addObject: tmp];
[tmp release];
tmp = [[OutputType alloc] init];
[tmp setDisplayText: @"HTML"];
[tmp setDocumentContentKind: NSXMLDocumentHTMLKind];
[outputTypeList addObject: tmp];
[tmp release];
tmp = [[OutputType alloc] init];
[tmp setDisplayText: @"XHTML"];
[tmp setDocumentContentKind: NSXMLDocumentXHTMLKind];
[outputTypeList addObject: tmp];
[tmp release];
/* tmp = [[OutputType alloc] init];
[tmp setDisplayText: @"Text"];
[tmp setDocumentContentKind: NSXMLDocumentTextKind];
[outputTypeList addObject: tmp];
[tmp release]; */
return self;
}
- (NSMutableArray *) outputTypeList
{
return outputTypeList;
}
- (void) setOutputTypeList: (NSMutableArray *) list
{
//not used we are pre-population the array on object
//creation. Changing can be added later if needed...
}
- (void)addObserver:(NSObject *)anObserver
forKeyPath:(NSString *)keyPath
options:(NSKeyValueObservingOptions)options
context:(void *)context
{
//like setting the array, the list wont change durring program
//execution so just devnull observers.
}
- (void)removeObserver:(NSObject *)anObserver
forKeyPath:(NSString *)keyPath
{
//like setting the array, the list wont change durring program
//execution so just devnull observers.
}
- (void) dealloc
{
NSLog(@"Destroying %@", self);
[outputTypeList release];
[super dealloc];
}
@end