Master repository for Dirac.
| Revision | 957ee8efe3f2f824d8a283251ebbe0a9001a115b (tree) |
|---|---|
| Time | 2011-04-21 18:39:26 |
| Author | Ichi Kanaya <kanaya@Ichi...> |
| Commiter | Ichi Kanaya |
The first working revision.
| @@ -14,6 +14,9 @@ | ||
| 14 | 14 | BF0D766F135FC3140031FDDD /* DiracDoc.m in Sources */ = {isa = PBXBuildFile; fileRef = BF0D766E135FC3140031FDDD /* DiracDoc.m */; }; |
| 15 | 15 | BF0D7672135FC3140031FDDD /* DiracDoc.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF0D7670135FC3140031FDDD /* DiracDoc.xib */; }; |
| 16 | 16 | 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 */; }; | |
| 17 | 20 | /* End PBXBuildFile section */ |
| 18 | 21 | |
| 19 | 22 | /* Begin PBXFileReference section */ |
| @@ -22,15 +25,21 @@ | ||
| 22 | 25 | BF0D765E135FC3140031FDDD /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; |
| 23 | 26 | BF0D765F135FC3140031FDDD /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; |
| 24 | 27 | 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>"; }; | |
| 26 | 29 | 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>"; }; | |
| 28 | 31 | BF0D7668135FC3140031FDDD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; |
| 29 | 32 | 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>"; }; | |
| 31 | 34 | BF0D766E135FC3140031FDDD /* DiracDoc.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DiracDoc.m; sourceTree = "<group>"; }; |
| 32 | 35 | BF0D7671135FC3140031FDDD /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/DiracDoc.xib; sourceTree = "<group>"; }; |
| 33 | 36 | 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>"; }; | |
| 34 | 43 | /* End PBXFileReference section */ |
| 35 | 44 | |
| 36 | 45 | /* Begin PBXFrameworksBuildPhase section */ |
| @@ -86,6 +95,12 @@ | ||
| 86 | 95 | children = ( |
| 87 | 96 | BF0D766D135FC3140031FDDD /* DiracDoc.h */, |
| 88 | 97 | 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 */, | |
| 89 | 104 | BF0D7670135FC3140031FDDD /* DiracDoc.xib */, |
| 90 | 105 | BF0D7673135FC3150031FDDD /* MainMenu.xib */, |
| 91 | 106 | BF0D7662135FC3140031FDDD /* Supporting Files */, |
| @@ -171,6 +186,9 @@ | ||
| 171 | 186 | files = ( |
| 172 | 187 | BF0D7669135FC3140031FDDD /* main.m in Sources */, |
| 173 | 188 | BF0D766F135FC3140031FDDD /* DiracDoc.m in Sources */, |
| 189 | + BF0D767D135FC4B30031FDDD /* DiracDocController.m in Sources */, | |
| 190 | + BF0D7680135FD0D00031FDDD /* DiracURLLoader.m in Sources */, | |
| 191 | + BF0D7683135FD4E10031FDDD /* DiracStatusXMLParser.m in Sources */, | |
| 174 | 192 | ); |
| 175 | 193 | runOnlyForDeploymentPostprocessing = 0; |
| 176 | 194 | }; |
| @@ -7,9 +7,16 @@ | ||
| 7 | 7 | // |
| 8 | 8 | |
| 9 | 9 | #import <Cocoa/Cocoa.h> |
| 10 | +#import "DiracDocController.h" | |
| 10 | 11 | |
| 11 | -@interface DiracDoc : NSDocument { | |
| 12 | +@interface DiracDoc: NSDocument { | |
| 13 | + DiracDocController *controller; | |
| 14 | + NSString *userName; | |
| 12 | 15 | @private |
| 13 | 16 | } |
| 14 | 17 | |
| 18 | +@property (retain, nonatomic) NSString *userName; | |
| 19 | + | |
| 20 | +- (void)registerMeAsAController: (id)sender; | |
| 21 | + | |
| 15 | 22 | @end |
| @@ -10,48 +10,64 @@ | ||
| 10 | 10 | |
| 11 | 11 | @implementation DiracDoc |
| 12 | 12 | |
| 13 | -- (id)init | |
| 14 | -{ | |
| 13 | +static NSString *defaultUserName = @"twitter"; | |
| 14 | + | |
| 15 | +@synthesize userName; | |
| 16 | + | |
| 17 | +- (id)init { | |
| 15 | 18 | self = [super init]; |
| 16 | 19 | if (self) { |
| 17 | 20 | // Add your subclass-specific initialization here. |
| 18 | 21 | // If an error occurs here, send a [self release] message and return nil. |
| 22 | + userName = defaultUserName; | |
| 19 | 23 | } |
| 20 | 24 | return self; |
| 21 | 25 | } |
| 22 | 26 | |
| 23 | -- (NSString *)windowNibName | |
| 24 | -{ | |
| 27 | +- (NSString *)windowNibName { | |
| 25 | 28 | // Override returning the nib file name of the document |
| 26 | 29 | // 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. |
| 27 | 30 | return @"DiracDoc"; |
| 28 | 31 | } |
| 29 | 32 | |
| 30 | -- (void)windowControllerDidLoadNib:(NSWindowController *)aController | |
| 31 | -{ | |
| 32 | - [super windowControllerDidLoadNib:aController]; | |
| 33 | +- (void)windowControllerDidLoadNib: (NSWindowController *)aController { | |
| 34 | + [super windowControllerDidLoadNib: aController]; | |
| 33 | 35 | // Add any code here that needs to be executed once the windowController has loaded the document's window. |
| 36 | + [controller load]; | |
| 34 | 37 | } |
| 35 | 38 | |
| 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 { | |
| 37 | 46 | /* |
| 38 | 47 | 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. |
| 39 | 48 | You can also choose to override -fileWrapperOfType:error:, -writeToURL:ofType:error:, or -writeToURL:ofType:forSaveOperation:originalContentsURL:error: instead. |
| 40 | 49 | */ |
| 50 | + /* | |
| 41 | 51 | if (outError) { |
| 42 | - *outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:NULL]; | |
| 52 | + *outError = [NSError errorWithDomain: NSOSStatusErrorDomain code: unimpErr userInfo: NULL]; | |
| 43 | 53 | } |
| 44 | 54 | return nil; |
| 55 | + */ | |
| 56 | + return [userName dataUsingEncoding: NSUTF8StringEncoding]; | |
| 45 | 57 | } |
| 46 | 58 | |
| 47 | -- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError { | |
| 59 | +- (BOOL)readFromData: (NSData *)data ofType: (NSString *)typeName error: (NSError **)outError { | |
| 48 | 60 | /* |
| 49 | 61 | 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. |
| 50 | 62 | You can also choose to override -readFromFileWrapper:ofType:error: or -readFromURL:ofType:error: instead. |
| 51 | 63 | */ |
| 64 | + userName = [[NSString alloc] initWithUTF8String: (const char *)[data bytes]]; | |
| 65 | + // controller.currentUserName = userName; | |
| 66 | + /* | |
| 52 | 67 | if (outError) { |
| 53 | - *outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:NULL]; | |
| 68 | + *outError = [NSError errorWithDomain: NSOSStatusErrorDomain code: unimpErr userInfo: NULL]; | |
| 54 | 69 | } |
| 70 | + */ | |
| 55 | 71 | return YES; |
| 56 | 72 | } |
| 57 | 73 |
| @@ -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 |
| @@ -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 |
| @@ -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 |
| @@ -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 |
| @@ -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 |
| @@ -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 |
| @@ -1,34 +1,32 @@ | ||
| 1 | 1 | <?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"> | |
| 3 | 3 | <data> |
| 4 | 4 | <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> | |
| 9 | 9 | <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> |
| 10 | 10 | <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> | |
| 12 | 12 | </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"> | |
| 19 | 26 | <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"> | |
| 32 | 30 | <object class="NSCustomObject" id="512844837"> |
| 33 | 31 | <string key="NSClassName">DiracDoc</string> |
| 34 | 32 | </object> |
| @@ -36,49 +34,50 @@ | ||
| 36 | 34 | <string key="NSClassName">FirstResponder</string> |
| 37 | 35 | </object> |
| 38 | 36 | <object class="NSWindowTemplate" id="275939982"> |
| 39 | - <int key="NSWindowStyleMask">15</int> | |
| 37 | + <int key="NSWindowStyleMask">263</int> | |
| 40 | 38 | <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> | |
| 43 | 41 | <string key="NSWindowTitle">Window</string> |
| 44 | 42 | <string key="NSWindowClass">NSWindow</string> |
| 45 | 43 | <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> | |
| 48 | 45 | <object class="NSView" key="NSWindowView" id="568628114"> |
| 49 | 46 | <reference key="NSNextResponder"/> |
| 50 | 47 | <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"> | |
| 54 | 50 | <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> | |
| 57 | 53 | <reference key="NSSuperview" ref="568628114"/> |
| 54 | + <reference key="NSNextKeyView" ref="859349326"/> | |
| 58 | 55 | <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"/> | |
| 63 | 60 | <object class="NSFont" key="NSSupport"> |
| 64 | 61 | <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> | |
| 67 | 64 | </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> | |
| 69 | 68 | <object class="NSColor" key="NSBackgroundColor"> |
| 70 | 69 | <int key="NSColorSpace">6</int> |
| 71 | 70 | <string key="NSCatalogName">System</string> |
| 72 | - <string key="NSColorName">controlColor</string> | |
| 71 | + <string key="NSColorName">textBackgroundColor</string> | |
| 73 | 72 | <object class="NSColor" key="NSColor"> |
| 74 | 73 | <int key="NSColorSpace">3</int> |
| 75 | - <bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes> | |
| 74 | + <bytes key="NSWhite">MQA</bytes> | |
| 76 | 75 | </object> |
| 77 | 76 | </object> |
| 78 | 77 | <object class="NSColor" key="NSTextColor"> |
| 79 | 78 | <int key="NSColorSpace">6</int> |
| 80 | 79 | <string key="NSCatalogName">System</string> |
| 81 | - <string key="NSColorName">controlTextColor</string> | |
| 80 | + <string key="NSColorName">textColor</string> | |
| 82 | 81 | <object class="NSColor" key="NSColor"> |
| 83 | 82 | <int key="NSColorSpace">3</int> |
| 84 | 83 | <bytes key="NSWhite">MAA</bytes> |
| @@ -86,21 +85,78 @@ | ||
| 86 | 85 | </object> |
| 87 | 86 | </object> |
| 88 | 87 | </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> | |
| 91 | 144 | <reference key="NSSuperview"/> |
| 145 | + <reference key="NSNextKeyView" ref="805794593"/> | |
| 92 | 146 | </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> | |
| 96 | 153 | </object> |
| 97 | 154 | <object class="NSCustomObject" id="796877042"> |
| 98 | 155 | <string key="NSClassName">NSApplication</string> |
| 99 | 156 | </object> |
| 100 | - </object> | |
| 157 | + </array> | |
| 101 | 158 | <object class="IBObjectContainer" key="IBDocument.Objects"> |
| 102 | - <object class="NSMutableArray" key="connectionRecords"> | |
| 103 | - <bool key="EncodedWithXMLCoder">YES</bool> | |
| 159 | + <array class="NSMutableArray" key="connectionRecords"> | |
| 104 | 160 | <object class="IBConnectionRecord"> |
| 105 | 161 | <object class="IBOutletConnection" key="connection"> |
| 106 | 162 | <string key="label">delegate</string> |
| @@ -117,13 +173,68 @@ | ||
| 117 | 173 | </object> |
| 118 | 174 | <int key="connectionID">18</int> |
| 119 | 175 | </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> | |
| 121 | 233 | <object class="IBMutableOrderedSet" key="objectRecords"> |
| 122 | - <object class="NSArray" key="orderedObjects"> | |
| 123 | - <bool key="EncodedWithXMLCoder">YES</bool> | |
| 234 | + <array key="orderedObjects"> | |
| 124 | 235 | <object class="IBObjectRecord"> |
| 125 | 236 | <int key="objectID">0</int> |
| 126 | - <reference key="object" ref="0"/> | |
| 237 | + <array key="object" id="0"/> | |
| 127 | 238 | <reference key="children" ref="580458321"/> |
| 128 | 239 | <nil key="parent"/> |
| 129 | 240 | </object> |
| @@ -131,7 +242,7 @@ | ||
| 131 | 242 | <int key="objectID">-2</int> |
| 132 | 243 | <reference key="object" ref="512844837"/> |
| 133 | 244 | <reference key="parent" ref="0"/> |
| 134 | - <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string> | |
| 245 | + <string key="objectName">File's Owner</string> | |
| 135 | 246 | </object> |
| 136 | 247 | <object class="IBObjectRecord"> |
| 137 | 248 | <int key="objectID">-1</int> |
| @@ -142,111 +253,114 @@ | ||
| 142 | 253 | <object class="IBObjectRecord"> |
| 143 | 254 | <int key="objectID">5</int> |
| 144 | 255 | <reference key="object" ref="275939982"/> |
| 145 | - <object class="NSMutableArray" key="children"> | |
| 146 | - <bool key="EncodedWithXMLCoder">YES</bool> | |
| 256 | + <array class="NSMutableArray" key="children"> | |
| 147 | 257 | <reference ref="568628114"/> |
| 148 | - </object> | |
| 258 | + </array> | |
| 149 | 259 | <reference key="parent" ref="0"/> |
| 150 | 260 | <string key="objectName">Window</string> |
| 151 | 261 | </object> |
| 152 | 262 | <object class="IBObjectRecord"> |
| 153 | 263 | <int key="objectID">6</int> |
| 154 | 264 | <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> | |
| 159 | 271 | <reference key="parent" ref="275939982"/> |
| 160 | 272 | </object> |
| 161 | 273 | <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> | |
| 168 | 285 | <reference key="parent" ref="568628114"/> |
| 169 | 286 | </object> |
| 170 | 287 | <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"/> | |
| 174 | 291 | </object> |
| 175 | 292 | <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"/> | |
| 178 | 308 | <reference key="parent" ref="0"/> |
| 179 | - <string key="objectName">Application</string> | |
| 180 | 309 | </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> | |
| 222 | 329 | </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"/> | |
| 223 | 351 | <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"/> | |
| 231 | 353 | <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> | |
| 246 | 355 | </object> |
| 356 | + <object class="IBClassDescriber" key="IBDocument.Classes"/> | |
| 247 | 357 | <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> | |
| 248 | 363 | <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> |
| 249 | - <string key="IBDocument.LastKnownRelativeProjectPath">../CocoaDocApp.xcodeproj</string> | |
| 250 | 364 | <int key="IBDocument.defaultPropertyAccessControl">3</int> |
| 251 | 365 | </data> |
| 252 | 366 | </archive> |