• R/O
  • HTTP
  • SSH
  • HTTPS

master: Commit

Master repository for Dirac.


Commit MetaInfo

Revision957ee8efe3f2f824d8a283251ebbe0a9001a115b (tree)
Time2011-04-21 18:39:26
AuthorIchi Kanaya <kanaya@Ichi...>
CommiterIchi Kanaya

Log Message

The first working revision.

Change Summary

Incremental Difference

--- a/Dirac.xcodeproj/project.pbxproj
+++ b/Dirac.xcodeproj/project.pbxproj
@@ -14,6 +14,9 @@
1414 BF0D766F135FC3140031FDDD /* DiracDoc.m in Sources */ = {isa = PBXBuildFile; fileRef = BF0D766E135FC3140031FDDD /* DiracDoc.m */; };
1515 BF0D7672135FC3140031FDDD /* DiracDoc.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF0D7670135FC3140031FDDD /* DiracDoc.xib */; };
1616 BF0D7675135FC3150031FDDD /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF0D7673135FC3150031FDDD /* MainMenu.xib */; };
17+ BF0D767D135FC4B30031FDDD /* DiracDocController.m in Sources */ = {isa = PBXBuildFile; fileRef = BF0D767C135FC4B30031FDDD /* DiracDocController.m */; };
18+ BF0D7680135FD0D00031FDDD /* DiracURLLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = BF0D767F135FD0D00031FDDD /* DiracURLLoader.m */; };
19+ BF0D7683135FD4E10031FDDD /* DiracStatusXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = BF0D7682135FD4E10031FDDD /* DiracStatusXMLParser.m */; };
1720 /* End PBXBuildFile section */
1821
1922 /* Begin PBXFileReference section */
@@ -22,15 +25,21 @@
2225 BF0D765E135FC3140031FDDD /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
2326 BF0D765F135FC3140031FDDD /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
2427 BF0D7660135FC3140031FDDD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
25- BF0D7663135FC3140031FDDD /* Dirac-Info.plist */ = {isa = PBXFileReference; path = "Dirac-Info.plist"; sourceTree = "<group>"; };
28+ BF0D7663135FC3140031FDDD /* Dirac-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Dirac-Info.plist"; sourceTree = "<group>"; };
2629 BF0D7665135FC3140031FDDD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
27- BF0D7667135FC3140031FDDD /* Dirac-Prefix.pch */ = {isa = PBXFileReference; path = "Dirac-Prefix.pch"; sourceTree = "<group>"; };
30+ BF0D7667135FC3140031FDDD /* Dirac-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Dirac-Prefix.pch"; sourceTree = "<group>"; };
2831 BF0D7668135FC3140031FDDD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
2932 BF0D766B135FC3140031FDDD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
30- BF0D766D135FC3140031FDDD /* DiracDoc.h */ = {isa = PBXFileReference; path = DiracDoc.h; sourceTree = "<group>"; };
33+ BF0D766D135FC3140031FDDD /* DiracDoc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DiracDoc.h; sourceTree = "<group>"; };
3134 BF0D766E135FC3140031FDDD /* DiracDoc.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DiracDoc.m; sourceTree = "<group>"; };
3235 BF0D7671135FC3140031FDDD /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/DiracDoc.xib; sourceTree = "<group>"; };
3336 BF0D7674135FC3150031FDDD /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
37+ BF0D767B135FC4B30031FDDD /* DiracDocController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiracDocController.h; sourceTree = "<group>"; };
38+ BF0D767C135FC4B30031FDDD /* DiracDocController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DiracDocController.m; sourceTree = "<group>"; };
39+ BF0D767E135FD0D00031FDDD /* DiracURLLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiracURLLoader.h; sourceTree = "<group>"; };
40+ BF0D767F135FD0D00031FDDD /* DiracURLLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DiracURLLoader.m; sourceTree = "<group>"; };
41+ BF0D7681135FD4E10031FDDD /* DiracStatusXMLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiracStatusXMLParser.h; sourceTree = "<group>"; };
42+ BF0D7682135FD4E10031FDDD /* DiracStatusXMLParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DiracStatusXMLParser.m; sourceTree = "<group>"; };
3443 /* End PBXFileReference section */
3544
3645 /* Begin PBXFrameworksBuildPhase section */
@@ -86,6 +95,12 @@
8695 children = (
8796 BF0D766D135FC3140031FDDD /* DiracDoc.h */,
8897 BF0D766E135FC3140031FDDD /* DiracDoc.m */,
98+ BF0D767B135FC4B30031FDDD /* DiracDocController.h */,
99+ BF0D767C135FC4B30031FDDD /* DiracDocController.m */,
100+ BF0D767E135FD0D00031FDDD /* DiracURLLoader.h */,
101+ BF0D767F135FD0D00031FDDD /* DiracURLLoader.m */,
102+ BF0D7681135FD4E10031FDDD /* DiracStatusXMLParser.h */,
103+ BF0D7682135FD4E10031FDDD /* DiracStatusXMLParser.m */,
89104 BF0D7670135FC3140031FDDD /* DiracDoc.xib */,
90105 BF0D7673135FC3150031FDDD /* MainMenu.xib */,
91106 BF0D7662135FC3140031FDDD /* Supporting Files */,
@@ -171,6 +186,9 @@
171186 files = (
172187 BF0D7669135FC3140031FDDD /* main.m in Sources */,
173188 BF0D766F135FC3140031FDDD /* DiracDoc.m in Sources */,
189+ BF0D767D135FC4B30031FDDD /* DiracDocController.m in Sources */,
190+ BF0D7680135FD0D00031FDDD /* DiracURLLoader.m in Sources */,
191+ BF0D7683135FD4E10031FDDD /* DiracStatusXMLParser.m in Sources */,
174192 );
175193 runOnlyForDeploymentPostprocessing = 0;
176194 };
--- a/Dirac/DiracDoc.h
+++ b/Dirac/DiracDoc.h
@@ -7,9 +7,16 @@
77 //
88
99 #import <Cocoa/Cocoa.h>
10+#import "DiracDocController.h"
1011
11-@interface DiracDoc : NSDocument {
12+@interface DiracDoc: NSDocument {
13+ DiracDocController *controller;
14+ NSString *userName;
1215 @private
1316 }
1417
18+@property (retain, nonatomic) NSString *userName;
19+
20+- (void)registerMeAsAController: (id)sender;
21+
1522 @end
--- a/Dirac/DiracDoc.m
+++ b/Dirac/DiracDoc.m
@@ -10,48 +10,64 @@
1010
1111 @implementation DiracDoc
1212
13-- (id)init
14-{
13+static NSString *defaultUserName = @"twitter";
14+
15+@synthesize userName;
16+
17+- (id)init {
1518 self = [super init];
1619 if (self) {
1720 // Add your subclass-specific initialization here.
1821 // If an error occurs here, send a [self release] message and return nil.
22+ userName = defaultUserName;
1923 }
2024 return self;
2125 }
2226
23-- (NSString *)windowNibName
24-{
27+- (NSString *)windowNibName {
2528 // Override returning the nib file name of the document
2629 // If you need to use a subclass of NSWindowController or if your document supports multiple NSWindowControllers, you should remove this method and override -makeWindowControllers instead.
2730 return @"DiracDoc";
2831 }
2932
30-- (void)windowControllerDidLoadNib:(NSWindowController *)aController
31-{
32- [super windowControllerDidLoadNib:aController];
33+- (void)windowControllerDidLoadNib: (NSWindowController *)aController {
34+ [super windowControllerDidLoadNib: aController];
3335 // Add any code here that needs to be executed once the windowController has loaded the document's window.
36+ [controller load];
3437 }
3538
36-- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError {
39+- (void)registerMeAsAController: (id)sender {
40+ controller = sender;
41+ // NSLog(@"controller registered.");
42+}
43+
44+
45+- (NSData *)dataOfType: (NSString *)typeName error: (NSError **)outError {
3746 /*
3847 Insert code here to write your document to data of the specified type. If outError != NULL, ensure that you create and set an appropriate error when returning nil.
3948 You can also choose to override -fileWrapperOfType:error:, -writeToURL:ofType:error:, or -writeToURL:ofType:forSaveOperation:originalContentsURL:error: instead.
4049 */
50+ /*
4151 if (outError) {
42- *outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:NULL];
52+ *outError = [NSError errorWithDomain: NSOSStatusErrorDomain code: unimpErr userInfo: NULL];
4353 }
4454 return nil;
55+ */
56+ return [userName dataUsingEncoding: NSUTF8StringEncoding];
4557 }
4658
47-- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError {
59+- (BOOL)readFromData: (NSData *)data ofType: (NSString *)typeName error: (NSError **)outError {
4860 /*
4961 Insert code here to read your document from the given data of the specified type. If outError != NULL, ensure that you create and set an appropriate error when returning NO.
5062 You can also choose to override -readFromFileWrapper:ofType:error: or -readFromURL:ofType:error: instead.
5163 */
64+ userName = [[NSString alloc] initWithUTF8String: (const char *)[data bytes]];
65+ // controller.currentUserName = userName;
66+ /*
5267 if (outError) {
53- *outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:NULL];
68+ *outError = [NSError errorWithDomain: NSOSStatusErrorDomain code: unimpErr userInfo: NULL];
5469 }
70+ */
5571 return YES;
5672 }
5773
--- /dev/null
+++ b/Dirac/DiracDocController.h
@@ -0,0 +1,29 @@
1+//
2+// DiracDocController.h
3+// Dirac
4+//
5+// Created by Ichi Kanaya on 11/04/21.
6+// Copyright 2011 大阪大学. All rights reserved.
7+//
8+
9+#import <Foundation/Foundation.h>
10+
11+@interface DiracDocController: NSObject {
12+ IBOutlet NSDocument *doc;
13+ IBOutlet NSWindow *window;
14+ IBOutlet NSLevelIndicator *levelIndicator;
15+ IBOutlet NSTextField *userNameTextField;
16+ IBOutlet NSProgressIndicator *progressIndicator;
17+ NSArray *statuses;
18+ NSTimer *timer;
19+@private
20+}
21+
22+@property (retain, nonatomic) NSArray *statuses;
23+
24+- (IBAction)reload: (id)sender;
25+- (void)load;
26+- (void)loadTimeLineByUserName: (NSString *)userName;
27+
28+
29+@end
--- /dev/null
+++ b/Dirac/DiracDocController.m
@@ -0,0 +1,112 @@
1+//
2+// DiracDocController.m
3+// Dirac
4+//
5+// Created by Ichi Kanaya on 11/04/21.
6+// Copyright 2011 大阪大学. All rights reserved.
7+//
8+
9+#import <math.h>
10+#import "DiracDocController.h"
11+#import "DiracDoc.h"
12+#import "DiracURLLoader.h"
13+#import "DiracStatusXMLParser.h"
14+
15+#define WINDOW_SIZE (24 * 3600)
16+
17+@implementation DiracDocController
18+
19+@synthesize statuses;
20+
21+- (id)init {
22+ self = [super init];
23+ if (self) {
24+ // Initialization code here.
25+ }
26+ return self;
27+}
28+
29+- (void)dealloc {
30+ [super dealloc];
31+}
32+
33+- (void)awakeFromNib {
34+ DiracDoc *_doc = (DiracDoc *)doc;
35+ [_doc registerMeAsAController: self];
36+ timer = [NSTimer scheduledTimerWithTimeInterval: 30 * 60
37+ target: self
38+ selector: @selector(timer_fire:)
39+ userInfo: nil
40+ repeats: YES];
41+ [progressIndicator setUsesThreadedAnimation: YES];
42+}
43+
44+- (void)timer_fire: (NSTimer *)timer {
45+ [self reload: self];
46+}
47+
48+- (IBAction)reload: (id)sender {
49+ NSString *userName = [userNameTextField stringValue];
50+ if (userName) {
51+ DiracDoc *_doc = (DiracDoc *)doc;
52+ _doc.userName = userName;
53+ [self load];
54+ }
55+}
56+
57+- (void)load {
58+ NSString *userName = ((DiracDoc *)doc).userName;
59+ [userNameTextField setStringValue: userName];
60+ [window setTitle: userName];
61+ [self loadTimeLineByUserName: userName];
62+}
63+
64+- (void)loadTimeLineByUserName: (NSString *)userName {
65+ static NSString *urlFormat = @"http://twitter.com/status/user_timeline/%@.xml";
66+ NSString *url = [NSString stringWithFormat: urlFormat, userName];
67+
68+ [progressIndicator startAnimation: self];
69+ DiracURLLoader *loder = [[[DiracURLLoader alloc] init] autorelease];
70+ [[NSNotificationCenter defaultCenter] addObserver: self
71+ selector: @selector(loadTimeLineDidEnd:)
72+ name: @"connectionDidFinishNotification"
73+ object: loder];
74+ [[NSNotificationCenter defaultCenter] addObserver: self
75+ selector: @selector(loadTimeLineFailed:)
76+ name: @"connectionDidFailWithError"
77+ object: loder];
78+
79+ // [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
80+
81+ [loder loadFromUrl: url method: @"GET"];
82+}
83+
84+- (void) loadTimeLineDidEnd: (NSNotification *)notification {
85+ DiracURLLoader *loder = (DiracURLLoader *)[notification object];
86+ NSData *xmlData = loder.data;
87+ DiracStatusXMLParser *parser = [[[DiracStatusXMLParser alloc] init] autorelease];
88+ self.statuses = [parser parseStatuses: xmlData];
89+ int count = 0;
90+ NSTimeInterval biggest_time_interval = -1;
91+ for (NSDictionary *status in statuses) {
92+ NSDate *created_date = [NSDate dateWithNaturalLanguageString: [status objectForKey: @"created_at"]];
93+ NSTimeInterval interval = [created_date timeIntervalSinceNow];
94+ if (interval > -WINDOW_SIZE) {
95+ ++count;
96+ if (interval < biggest_time_interval) {
97+ biggest_time_interval = interval;
98+ }
99+ }
100+ }
101+ float divider = (-biggest_time_interval < WINDOW_SIZE) ? -biggest_time_interval : WINDOW_SIZE;
102+ float diracCount = (float)count / divider * 3600;
103+ [levelIndicator setFloatValue: diracCount * 1000];
104+ [progressIndicator stopAnimation: self];
105+ NSLog(@"%@ is twittering at a speed of %f[dirac].", ((DiracDoc *)doc).userName, diracCount);
106+}
107+
108+- (void) loadTimeLineFailed: (NSNotification *)notification {
109+ // do something
110+}
111+
112+@end
--- /dev/null
+++ b/Dirac/DiracStatusXMLParser.h
@@ -0,0 +1,25 @@
1+//
2+// DiracStatusXMLParser.h
3+// Dirac
4+//
5+// Created by Ichi Kanaya on 11/04/21.
6+// Copyright 2011 大阪大学. All rights reserved.
7+//
8+
9+#import <Foundation/Foundation.h>
10+
11+@interface DiracStatusXMLParser: NSObject <NSXMLParserDelegate> {
12+ NSMutableString *currentXpath;
13+ NSMutableArray *statuses;
14+ NSMutableDictionary *currentStatus;
15+ NSMutableString *textNodeCharacters;
16+}
17+
18+@property (retain, nonatomic) NSMutableString *currentXpath;
19+@property (retain, nonatomic) NSMutableArray *statuses;
20+@property (retain, nonatomic) NSMutableDictionary *currentStatus;
21+@property (retain, nonatomic) NSMutableString *textNodeCharacters;
22+
23+- (NSArray *)parseStatuses: (NSData *)xmlData;
24+
25+@end
--- /dev/null
+++ b/Dirac/DiracStatusXMLParser.m
@@ -0,0 +1,86 @@
1+//
2+// DiracStatusXMLParser.m
3+// Dirac
4+//
5+// Created by Ichi Kanaya on 11/04/21.
6+// Copyright 2011 大阪大学. All rights reserved.
7+//
8+
9+#import "DiracStatusXMLParser.h"
10+
11+@implementation DiracStatusXMLParser
12+
13+@synthesize currentXpath;
14+@synthesize statuses;
15+@synthesize currentStatus;
16+@synthesize textNodeCharacters;
17+
18+- (id)init {
19+ self = [super init];
20+ if (self) {
21+ // Initialization code here.
22+ }
23+ return self;
24+}
25+
26+- (void) dealloc {
27+ [currentXpath release];
28+ [statuses release];
29+ [currentStatus release];
30+ [textNodeCharacters release];
31+ [super dealloc];
32+}
33+
34+- (void)parserDidStartDocument: (NSXMLParser *)parser {
35+ self.currentXpath = [[[NSMutableString alloc]init] autorelease];
36+ self.statuses = [[[NSMutableArray alloc] init] autorelease];
37+}
38+
39+- (void)parser: (NSXMLParser *)parser didStartElement: (NSString *)elementName namespaceURI: (NSString *)namespaceURI qualifiedName:(NSString *)qName attributes: (NSDictionary *)attributeDict {
40+ [self.currentXpath appendString: elementName];
41+ [self.currentXpath appendString: @"/"];
42+
43+ self.textNodeCharacters = [[[NSMutableString alloc] init] autorelease];
44+
45+ if ([self.currentXpath isEqualToString: @"statuses/status/"]) {
46+ self.currentStatus = [[[NSMutableDictionary alloc] init] autorelease];
47+ }
48+}
49+
50+- (void)parser: (NSXMLParser *)parser didEndElement: (NSString *)elementName namespaceURI: (NSString *)namespaceURI qualifiedName: (NSString *)qName {
51+ NSString *textData = [self.textNodeCharacters stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
52+
53+ if ([self.currentXpath isEqualToString: @"statuses/status/"]) {
54+ [self.statuses addObject: self.currentStatus];
55+ self.currentStatus = nil;
56+
57+ }
58+ else if ([self.currentXpath isEqualToString: @"statuses/status/created_at/"]) {
59+ [self.currentStatus setValue: textData forKey: @"created_at"];
60+ }
61+ else if ([self.currentXpath isEqualToString: @"statuses/status/text/"]) {
62+ [self.currentStatus setValue: textData forKey: @"text"];
63+
64+ }
65+ else if ([self.currentXpath isEqualToString: @"statuses/status/user/name/"]) {
66+ [self.currentStatus setValue: textData forKey: @"name"];
67+ }
68+
69+ unsigned long delLength = [elementName length] + 1;
70+ unsigned long delIndex = [self.currentXpath length] - delLength;
71+
72+ [self.currentXpath deleteCharactersInRange: NSMakeRange(delIndex, delLength)];
73+}
74+
75+- (void) parser:(NSXMLParser *)parser foundCharacters: (NSString *)string {
76+ [self.textNodeCharacters appendString:string];
77+}
78+
79+- (NSArray *)parseStatuses: (NSData *)xmlData {
80+ NSXMLParser *parser = [[[NSXMLParser alloc] initWithData:xmlData] autorelease];
81+ [parser setDelegate: self];
82+ [parser parse];
83+ return self.statuses;
84+}
85+
86+@end
--- /dev/null
+++ b/Dirac/DiracURLLoader.h
@@ -0,0 +1,21 @@
1+//
2+// DiracURLLoader.h
3+// Dirac
4+//
5+// Created by Ichi Kanaya on 11/04/21.
6+// Copyright 2011 大阪大学. All rights reserved.
7+//
8+
9+#import <Foundation/Foundation.h>
10+
11+@interface DiracURLLoader: NSObject {
12+ NSURLConnection *connection;
13+ NSMutableData *data;
14+}
15+
16+@property(retain, nonatomic) NSURLConnection *connection;
17+@property(retain, nonatomic) NSMutableData *data;
18+
19+- (void)loadFromUrl: (NSString *)url method: (NSString *) method;
20+
21+@end
--- /dev/null
+++ b/Dirac/DiracURLLoader.m
@@ -0,0 +1,57 @@
1+//
2+// DiracURLLoader.m
3+// Dirac
4+//
5+// Created by Ichi Kanaya on 11/04/21.
6+// Copyright 2011 大阪大学. All rights reserved.
7+//
8+
9+#import "DiracURLLoader.h"
10+
11+
12+@implementation DiracURLLoader
13+
14+@synthesize connection;
15+@synthesize data;
16+
17+- (id)init {
18+ self = [super init];
19+ if (self) {
20+ // Initialization code here.
21+ }
22+ return self;
23+}
24+
25+- (void)dealloc {
26+ [connection release];
27+ [data release];
28+ [super dealloc];
29+}
30+
31+- (void)connection: (NSURLConnection *)connection didReceiveResponse: (NSURLResponse *)response {
32+ self.data = [NSMutableData data];
33+}
34+
35+- (void)connection: (NSURLConnection *)connection didReceiveData: (NSData *)receiveData {
36+ [self.data appendData:receiveData];
37+}
38+
39+- (void)connectionDidFinishLoading: (NSURLConnection *)connection {
40+ [[NSNotificationCenter defaultCenter] postNotificationName: @"connectionDidFinishNotification"
41+ object: self];
42+}
43+
44+- (void)connection: (NSURLConnection *)connection didFailWithError: (NSError *)error {
45+ [[NSNotificationCenter defaultCenter] postNotificationName: @"connectionDidFailWithError"
46+ object: self];
47+}
48+
49+- (void)loadFromUrl: (NSString *)url method: (NSString *) method {
50+ NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL: [NSURL URLWithString: url]];
51+ [req setHTTPMethod: method];
52+ self.connection = [NSURLConnection connectionWithRequest: req delegate: self];
53+}
54+
55+
56+
57+@end
--- a/Dirac/en.lproj/DiracDoc.xib
+++ b/Dirac/en.lproj/DiracDoc.xib
@@ -1,34 +1,32 @@
11 <?xml version="1.0" encoding="UTF-8"?>
2-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.06">
2+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
33 <data>
44 <int key="IBDocument.SystemTarget">1060</int>
5- <string key="IBDocument.SystemVersion">10A261</string>
6- <string key="IBDocument.InterfaceBuilderVersion">710</string>
7- <string key="IBDocument.AppKitVersion">1005.2</string>
8- <string key="IBDocument.HIToolboxVersion">409.00</string>
5+ <string key="IBDocument.SystemVersion">10J869</string>
6+ <string key="IBDocument.InterfaceBuilderVersion">1305</string>
7+ <string key="IBDocument.AppKitVersion">1038.35</string>
8+ <string key="IBDocument.HIToolboxVersion">461.00</string>
99 <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
1010 <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
11- <string key="NS.object.0">710</string>
11+ <string key="NS.object.0">1305</string>
1212 </object>
13- <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
14- <bool key="EncodedWithXMLCoder">YES</bool>
15- <integer value="5"/>
16- </object>
17- <object class="NSArray" key="IBDocument.PluginDependencies">
18- <bool key="EncodedWithXMLCoder">YES</bool>
13+ <array key="IBDocument.IntegratedClassDependencies">
14+ <string>NSTextField</string>
15+ <string>NSView</string>
16+ <string>NSWindowTemplate</string>
17+ <string>NSCustomObject</string>
18+ <string>NSProgressIndicator</string>
19+ <string>NSLevelIndicatorCell</string>
20+ <string>NSButtonCell</string>
21+ <string>NSLevelIndicator</string>
22+ <string>NSButton</string>
23+ <string>NSTextFieldCell</string>
24+ </array>
25+ <array key="IBDocument.PluginDependencies">
1926 <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
20- </object>
21- <object class="NSMutableDictionary" key="IBDocument.Metadata">
22- <bool key="EncodedWithXMLCoder">YES</bool>
23- <object class="NSArray" key="dict.sortedKeys" id="0">
24- <bool key="EncodedWithXMLCoder">YES</bool>
25- </object>
26- <object class="NSMutableArray" key="dict.values">
27- <bool key="EncodedWithXMLCoder">YES</bool>
28- </object>
29- </object>
30- <object class="NSMutableArray" key="IBDocument.RootObjects" id="580458321">
31- <bool key="EncodedWithXMLCoder">YES</bool>
27+ </array>
28+ <dictionary class="NSMutableDictionary" key="IBDocument.Metadata"/>
29+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="580458321">
3230 <object class="NSCustomObject" id="512844837">
3331 <string key="NSClassName">DiracDoc</string>
3432 </object>
@@ -36,49 +34,50 @@
3634 <string key="NSClassName">FirstResponder</string>
3735 </object>
3836 <object class="NSWindowTemplate" id="275939982">
39- <int key="NSWindowStyleMask">15</int>
37+ <int key="NSWindowStyleMask">263</int>
4038 <int key="NSWindowBacking">2</int>
41- <string key="NSWindowRect">{{133, 235}, {507, 413}}</string>
42- <int key="NSWTFlags">1886912512</int>
39+ <string key="NSWindowRect">{{133, 235}, {507, 93}}</string>
40+ <int key="NSWTFlags">1886913536</int>
4341 <string key="NSWindowTitle">Window</string>
4442 <string key="NSWindowClass">NSWindow</string>
4543 <string key="NSViewClass">View</string>
46- <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
47- <string key="NSWindowContentMinSize">{94, 86}</string>
44+ <string key="NSWindowContentMinSize">{507, 62}</string>
4845 <object class="NSView" key="NSWindowView" id="568628114">
4946 <reference key="NSNextResponder"/>
5047 <int key="NSvFlags">256</int>
51- <object class="NSMutableArray" key="NSSubviews">
52- <bool key="EncodedWithXMLCoder">YES</bool>
53- <object class="NSTextField" id="433022199">
48+ <array class="NSMutableArray" key="NSSubviews">
49+ <object class="NSTextField" id="1039554402">
5450 <reference key="NSNextResponder" ref="568628114"/>
55- <int key="NSvFlags">256</int>
56- <string key="NSFrame">{{119, 195}, {269, 22}}</string>
51+ <int key="NSvFlags">266</int>
52+ <string key="NSFrame">{{20, 20}, {281, 22}}</string>
5753 <reference key="NSSuperview" ref="568628114"/>
54+ <reference key="NSNextKeyView" ref="859349326"/>
5855 <bool key="NSEnabled">YES</bool>
59- <object class="NSTextFieldCell" key="NSCell" id="566561048">
60- <int key="NSCellFlags">67239424</int>
61- <int key="NSCellFlags2">138412032</int>
62- <string key="NSContents">Your document contents here</string>
56+ <object class="NSTextFieldCell" key="NSCell" id="219430947">
57+ <int key="NSCellFlags">-1804468671</int>
58+ <int key="NSCellFlags2">272630784</int>
59+ <string key="NSContents"/>
6360 <object class="NSFont" key="NSSupport">
6461 <string key="NSName">LucidaGrande</string>
65- <double key="NSSize">18</double>
66- <int key="NSfFlags">16</int>
62+ <double key="NSSize">13</double>
63+ <int key="NSfFlags">1044</int>
6764 </object>
68- <reference key="NSControlView" ref="433022199"/>
65+ <string key="NSPlaceholderString">kanaya</string>
66+ <reference key="NSControlView" ref="1039554402"/>
67+ <bool key="NSDrawsBackground">YES</bool>
6968 <object class="NSColor" key="NSBackgroundColor">
7069 <int key="NSColorSpace">6</int>
7170 <string key="NSCatalogName">System</string>
72- <string key="NSColorName">controlColor</string>
71+ <string key="NSColorName">textBackgroundColor</string>
7372 <object class="NSColor" key="NSColor">
7473 <int key="NSColorSpace">3</int>
75- <bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes>
74+ <bytes key="NSWhite">MQA</bytes>
7675 </object>
7776 </object>
7877 <object class="NSColor" key="NSTextColor">
7978 <int key="NSColorSpace">6</int>
8079 <string key="NSCatalogName">System</string>
81- <string key="NSColorName">controlTextColor</string>
80+ <string key="NSColorName">textColor</string>
8281 <object class="NSColor" key="NSColor">
8382 <int key="NSColorSpace">3</int>
8483 <bytes key="NSWhite">MAA</bytes>
@@ -86,21 +85,78 @@
8685 </object>
8786 </object>
8887 </object>
89- </object>
90- <string key="NSFrameSize">{507, 413}</string>
88+ <object class="NSLevelIndicator" id="805794593">
89+ <reference key="NSNextResponder" ref="568628114"/>
90+ <int key="NSvFlags">266</int>
91+ <string key="NSFrame">{{20, 50}, {467, 23}}</string>
92+ <reference key="NSSuperview" ref="568628114"/>
93+ <reference key="NSNextKeyView" ref="1039554402"/>
94+ <bool key="NSEnabled">YES</bool>
95+ <object class="NSLevelIndicatorCell" key="NSCell" id="545038016">
96+ <int key="NSCellFlags">130560</int>
97+ <int key="NSCellFlags2">0</int>
98+ <reference key="NSControlView" ref="805794593"/>
99+ <double key="NSMaxValue">3000</double>
100+ <double key="NSWarningValue">2000</double>
101+ <double key="NSCriticalValue">3000</double>
102+ <int key="NSNumberOfTickMarks">31</int>
103+ <int key="NSNumberOfMajorTickMarks">4</int>
104+ <int key="NSIndicatorStyle">1</int>
105+ </object>
106+ </object>
107+ <object class="NSProgressIndicator" id="859349326">
108+ <reference key="NSNextResponder" ref="568628114"/>
109+ <int key="NSvFlags">5388</int>
110+ <object class="NSPSMatrix" key="NSDrawMatrix"/>
111+ <string key="NSFrame">{{309, 23}, {16, 16}}</string>
112+ <reference key="NSSuperview" ref="568628114"/>
113+ <reference key="NSNextKeyView" ref="482570557"/>
114+ <int key="NSpiFlags">28938</int>
115+ <double key="NSMaxValue">100</double>
116+ </object>
117+ <object class="NSButton" id="482570557">
118+ <reference key="NSNextResponder" ref="568628114"/>
119+ <int key="NSvFlags">268</int>
120+ <string key="NSFrame">{{333, 22}, {154, 17}}</string>
121+ <reference key="NSSuperview" ref="568628114"/>
122+ <reference key="NSNextKeyView"/>
123+ <bool key="NSEnabled">YES</bool>
124+ <object class="NSButtonCell" key="NSCell" id="1009929181">
125+ <int key="NSCellFlags">-2080244224</int>
126+ <int key="NSCellFlags2">134348800</int>
127+ <string key="NSContents">Reload</string>
128+ <object class="NSFont" key="NSSupport">
129+ <string key="NSName">LucidaGrande</string>
130+ <double key="NSSize">11</double>
131+ <int key="NSfFlags">3100</int>
132+ </object>
133+ <reference key="NSControlView" ref="482570557"/>
134+ <int key="NSButtonFlags">-2038152961</int>
135+ <int key="NSButtonFlags2">164</int>
136+ <string key="NSAlternateContents"/>
137+ <string key="NSKeyEquivalent"/>
138+ <int key="NSPeriodicDelay">400</int>
139+ <int key="NSPeriodicInterval">75</int>
140+ </object>
141+ </object>
142+ </array>
143+ <string key="NSFrame">{{7, 11}, {507, 93}}</string>
91144 <reference key="NSSuperview"/>
145+ <reference key="NSNextKeyView" ref="805794593"/>
92146 </object>
93- <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
94- <string key="NSMinSize">{94, 108}</string>
95- <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
147+ <string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
148+ <string key="NSMinSize">{507, 84}</string>
149+ <string key="NSMaxSize">{1e+13, 1e+13}</string>
150+ </object>
151+ <object class="NSCustomObject" id="795723766">
152+ <string key="NSClassName">DiracDocController</string>
96153 </object>
97154 <object class="NSCustomObject" id="796877042">
98155 <string key="NSClassName">NSApplication</string>
99156 </object>
100- </object>
157+ </array>
101158 <object class="IBObjectContainer" key="IBDocument.Objects">
102- <object class="NSMutableArray" key="connectionRecords">
103- <bool key="EncodedWithXMLCoder">YES</bool>
159+ <array class="NSMutableArray" key="connectionRecords">
104160 <object class="IBConnectionRecord">
105161 <object class="IBOutletConnection" key="connection">
106162 <string key="label">delegate</string>
@@ -117,13 +173,68 @@
117173 </object>
118174 <int key="connectionID">18</int>
119175 </object>
120- </object>
176+ <object class="IBConnectionRecord">
177+ <object class="IBOutletConnection" key="connection">
178+ <string key="label">levelIndicator</string>
179+ <reference key="source" ref="795723766"/>
180+ <reference key="destination" ref="805794593"/>
181+ </object>
182+ <int key="connectionID">100028</int>
183+ </object>
184+ <object class="IBConnectionRecord">
185+ <object class="IBOutletConnection" key="connection">
186+ <string key="label">userNameTextField</string>
187+ <reference key="source" ref="795723766"/>
188+ <reference key="destination" ref="1039554402"/>
189+ </object>
190+ <int key="connectionID">100034</int>
191+ </object>
192+ <object class="IBConnectionRecord">
193+ <object class="IBActionConnection" key="connection">
194+ <string key="label">reload:</string>
195+ <reference key="source" ref="795723766"/>
196+ <reference key="destination" ref="482570557"/>
197+ </object>
198+ <int key="connectionID">100044</int>
199+ </object>
200+ <object class="IBConnectionRecord">
201+ <object class="IBOutletConnection" key="connection">
202+ <string key="label">progressIndicator</string>
203+ <reference key="source" ref="795723766"/>
204+ <reference key="destination" ref="859349326"/>
205+ </object>
206+ <int key="connectionID">100045</int>
207+ </object>
208+ <object class="IBConnectionRecord">
209+ <object class="IBOutletConnection" key="connection">
210+ <string key="label">window</string>
211+ <reference key="source" ref="795723766"/>
212+ <reference key="destination" ref="275939982"/>
213+ </object>
214+ <int key="connectionID">100046</int>
215+ </object>
216+ <object class="IBConnectionRecord">
217+ <object class="IBActionConnection" key="connection">
218+ <string key="label">reload:</string>
219+ <reference key="source" ref="795723766"/>
220+ <reference key="destination" ref="1039554402"/>
221+ </object>
222+ <int key="connectionID">100047</int>
223+ </object>
224+ <object class="IBConnectionRecord">
225+ <object class="IBOutletConnection" key="connection">
226+ <string key="label">doc</string>
227+ <reference key="source" ref="795723766"/>
228+ <reference key="destination" ref="512844837"/>
229+ </object>
230+ <int key="connectionID">100048</int>
231+ </object>
232+ </array>
121233 <object class="IBMutableOrderedSet" key="objectRecords">
122- <object class="NSArray" key="orderedObjects">
123- <bool key="EncodedWithXMLCoder">YES</bool>
234+ <array key="orderedObjects">
124235 <object class="IBObjectRecord">
125236 <int key="objectID">0</int>
126- <reference key="object" ref="0"/>
237+ <array key="object" id="0"/>
127238 <reference key="children" ref="580458321"/>
128239 <nil key="parent"/>
129240 </object>
@@ -131,7 +242,7 @@
131242 <int key="objectID">-2</int>
132243 <reference key="object" ref="512844837"/>
133244 <reference key="parent" ref="0"/>
134- <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
245+ <string key="objectName">File's Owner</string>
135246 </object>
136247 <object class="IBObjectRecord">
137248 <int key="objectID">-1</int>
@@ -142,111 +253,114 @@
142253 <object class="IBObjectRecord">
143254 <int key="objectID">5</int>
144255 <reference key="object" ref="275939982"/>
145- <object class="NSMutableArray" key="children">
146- <bool key="EncodedWithXMLCoder">YES</bool>
256+ <array class="NSMutableArray" key="children">
147257 <reference ref="568628114"/>
148- </object>
258+ </array>
149259 <reference key="parent" ref="0"/>
150260 <string key="objectName">Window</string>
151261 </object>
152262 <object class="IBObjectRecord">
153263 <int key="objectID">6</int>
154264 <reference key="object" ref="568628114"/>
155- <object class="NSMutableArray" key="children">
156- <bool key="EncodedWithXMLCoder">YES</bool>
157- <reference ref="433022199"/>
158- </object>
265+ <array class="NSMutableArray" key="children">
266+ <reference ref="805794593"/>
267+ <reference ref="1039554402"/>
268+ <reference ref="859349326"/>
269+ <reference ref="482570557"/>
270+ </array>
159271 <reference key="parent" ref="275939982"/>
160272 </object>
161273 <object class="IBObjectRecord">
162- <int key="objectID">20</int>
163- <reference key="object" ref="433022199"/>
164- <object class="NSMutableArray" key="children">
165- <bool key="EncodedWithXMLCoder">YES</bool>
166- <reference ref="566561048"/>
167- </object>
274+ <int key="objectID">-3</int>
275+ <reference key="object" ref="796877042"/>
276+ <reference key="parent" ref="0"/>
277+ <string key="objectName">Application</string>
278+ </object>
279+ <object class="IBObjectRecord">
280+ <int key="objectID">100021</int>
281+ <reference key="object" ref="1039554402"/>
282+ <array class="NSMutableArray" key="children">
283+ <reference ref="219430947"/>
284+ </array>
168285 <reference key="parent" ref="568628114"/>
169286 </object>
170287 <object class="IBObjectRecord">
171- <int key="objectID">100020</int>
172- <reference key="object" ref="566561048"/>
173- <reference key="parent" ref="433022199"/>
288+ <int key="objectID">100022</int>
289+ <reference key="object" ref="219430947"/>
290+ <reference key="parent" ref="1039554402"/>
174291 </object>
175292 <object class="IBObjectRecord">
176- <int key="objectID">-3</int>
177- <reference key="object" ref="796877042"/>
293+ <int key="objectID">100023</int>
294+ <reference key="object" ref="805794593"/>
295+ <array class="NSMutableArray" key="children">
296+ <reference ref="545038016"/>
297+ </array>
298+ <reference key="parent" ref="568628114"/>
299+ </object>
300+ <object class="IBObjectRecord">
301+ <int key="objectID">100024</int>
302+ <reference key="object" ref="545038016"/>
303+ <reference key="parent" ref="805794593"/>
304+ </object>
305+ <object class="IBObjectRecord">
306+ <int key="objectID">100027</int>
307+ <reference key="object" ref="795723766"/>
178308 <reference key="parent" ref="0"/>
179- <string key="objectName">Application</string>
180309 </object>
181- </object>
182- </object>
183- <object class="NSMutableDictionary" key="flattenedProperties">
184- <bool key="EncodedWithXMLCoder">YES</bool>
185- <object class="NSArray" key="dict.sortedKeys">
186- <bool key="EncodedWithXMLCoder">YES</bool>
187- <string>100020.IBPluginDependency</string>
188- <string>20.IBPluginDependency</string>
189- <string>20.ImportedFromIB2</string>
190- <string>5.IBEditorWindowLastContentRect</string>
191- <string>5.IBPluginDependency</string>
192- <string>5.IBWindowTemplateEditedContentRect</string>
193- <string>5.ImportedFromIB2</string>
194- <string>5.editorWindowContentRectSynchronizationRect</string>
195- <string>5.windowTemplate.hasMinSize</string>
196- <string>5.windowTemplate.minSize</string>
197- <string>6.IBPluginDependency</string>
198- <string>6.ImportedFromIB2</string>
199- </object>
200- <object class="NSMutableArray" key="dict.values">
201- <bool key="EncodedWithXMLCoder">YES</bool>
202- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
203- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
204- <integer value="1"/>
205- <string>{{133, 170}, {507, 413}}</string>
206- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
207- <string>{{133, 170}, {507, 413}}</string>
208- <integer value="1"/>
209- <string>{{201, 387}, {507, 413}}</string>
210- <integer value="1"/>
211- <string>{94, 86}</string>
212- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
213- <integer value="1"/>
214- </object>
215- </object>
216- <object class="NSMutableDictionary" key="unlocalizedProperties">
217- <bool key="EncodedWithXMLCoder">YES</bool>
218- <reference key="dict.sortedKeys" ref="0"/>
219- <object class="NSMutableArray" key="dict.values">
220- <bool key="EncodedWithXMLCoder">YES</bool>
221- </object>
310+ <object class="IBObjectRecord">
311+ <int key="objectID">100037</int>
312+ <reference key="object" ref="859349326"/>
313+ <reference key="parent" ref="568628114"/>
314+ </object>
315+ <object class="IBObjectRecord">
316+ <int key="objectID">100042</int>
317+ <reference key="object" ref="482570557"/>
318+ <array class="NSMutableArray" key="children">
319+ <reference ref="1009929181"/>
320+ </array>
321+ <reference key="parent" ref="568628114"/>
322+ </object>
323+ <object class="IBObjectRecord">
324+ <int key="objectID">100043</int>
325+ <reference key="object" ref="1009929181"/>
326+ <reference key="parent" ref="482570557"/>
327+ </object>
328+ </array>
222329 </object>
330+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
331+ <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
332+ <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
333+ <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
334+ <string key="100021.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
335+ <string key="100022.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
336+ <string key="100023.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
337+ <string key="100024.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
338+ <string key="100027.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
339+ <string key="100037.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
340+ <string key="100042.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
341+ <string key="100043.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
342+ <string key="5.IBEditorWindowLastContentRect">{{133, 170}, {507, 413}}</string>
343+ <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
344+ <string key="5.IBWindowTemplateEditedContentRect">{{133, 170}, {507, 413}}</string>
345+ <integer value="1" key="5.ImportedFromIB2"/>
346+ <string key="5.editorWindowContentRectSynchronizationRect">{{201, 387}, {507, 413}}</string>
347+ <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
348+ <integer value="1" key="6.ImportedFromIB2"/>
349+ </dictionary>
350+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
223351 <nil key="activeLocalization"/>
224- <object class="NSMutableDictionary" key="localizations">
225- <bool key="EncodedWithXMLCoder">YES</bool>
226- <reference key="dict.sortedKeys" ref="0"/>
227- <object class="NSMutableArray" key="dict.values">
228- <bool key="EncodedWithXMLCoder">YES</bool>
229- </object>
230- </object>
352+ <dictionary class="NSMutableDictionary" key="localizations"/>
231353 <nil key="sourceID"/>
232- <int key="maxID">100020</int>
233- </object>
234- <object class="IBClassDescriber" key="IBDocument.Classes">
235- <object class="NSMutableArray" key="referencedPartialClassDescriptions">
236- <bool key="EncodedWithXMLCoder">YES</bool>
237- <object class="IBPartialClassDescription">
238- <string key="className">DiracDoc</string>
239- <string key="superclassName">NSDocument</string>
240- <object class="IBClassDescriptionSource" key="sourceIdentifier">
241- <string key="majorKey">IBProjectSource</string>
242- <string key="minorKey">DiracDoc.h</string>
243- </object>
244- </object>
245- </object>
354+ <int key="maxID">100048</int>
246355 </object>
356+ <object class="IBClassDescriber" key="IBDocument.Classes"/>
247357 <int key="IBDocument.localizationMode">0</int>
358+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
359+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
360+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
361+ <real value="4000" key="NS.object.0"/>
362+ </object>
248363 <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
249- <string key="IBDocument.LastKnownRelativeProjectPath">../CocoaDocApp.xcodeproj</string>
250364 <int key="IBDocument.defaultPropertyAccessControl">3</int>
251365 </data>
252366 </archive>
Show on old repository browser