Permalink
Browse files

Fixed RequestDetails panel to work with new document based appoach.

  • Loading branch information...
mmower committed Feb 18, 2009
1 parent f478705 commit f3969b55ba9b7d5e84cfb0e76f1b7dbdc5cb6261
Showing with 146 additions and 108 deletions.
  1. +98 −81 English.lproj/RequestDetails.xib
  2. +3 −2 LogDocument.h
  3. +7 −6 LogDocument.m
  4. +0 −7 RequestDetailsController.h
  5. +0 −12 RequestDetailsController.m
  6. +38 −0 Spike.xcodeproj/project.pbxproj
@@ -8,7 +8,7 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="2"/>
<integer value="31"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -27,7 +27,7 @@
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
<string key="NSClassName">RequestDetailsController</string>
<string key="NSClassName">LogDocument</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
@@ -769,8 +769,6 @@
<object class="NSMutableArray" key="NSDeclaredKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>description</string>
<string>appController.requestsController.selection.session</string>
<string>appController.requestsController.selection.url</string>
</object>
<bool key="NSEditable">YES</bool>
<object class="_NSManagedProxy" key="_NSManagedProxy"/>
@@ -799,14 +797,6 @@
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="998420937"/>
</object>
<int key="connectionID">21</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: arrangedObjects.description</string>
@@ -823,54 +813,6 @@
</object>
<int key="connectionID">24</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">contentArray: appController.requestsController.selection.renders</string>
<reference key="source" ref="1069352449"/>
<reference key="destination" ref="1001"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="1069352449"/>
<reference key="NSDestination" ref="1001"/>
<string key="NSLabel">contentArray: appController.requestsController.selection.renders</string>
<string key="NSBinding">contentArray</string>
<string key="NSKeyPath">appController.requestsController.selection.renders</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">26</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">attributedString: appController.requestsController.selection.sourceLog</string>
<reference key="source" ref="200082955"/>
<reference key="destination" ref="1001"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="200082955"/>
<reference key="NSDestination" ref="1001"/>
<string key="NSLabel">attributedString: appController.requestsController.selection.sourceLog</string>
<string key="NSBinding">attributedString</string>
<string key="NSKeyPath">appController.requestsController.selection.sourceLog</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">44</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">contentArray: appController.requestsController.selection.params</string>
<reference key="source" ref="692961281"/>
<reference key="destination" ref="1001"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="692961281"/>
<reference key="NSDestination" ref="1001"/>
<string key="NSLabel">contentArray: appController.requestsController.selection.params</string>
<string key="NSBinding">contentArray</string>
<string key="NSKeyPath">appController.requestsController.selection.params</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">56</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: arrangedObjects.name</string>
@@ -919,53 +861,109 @@
</object>
<int key="connectionID">59</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="998420937"/>
</object>
<int key="connectionID">81</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: appController.requestsController.selection.session</string>
<string key="label">value: requestsController.selection.session</string>
<reference key="source" ref="859593679"/>
<reference key="destination" ref="1001"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="859593679"/>
<reference key="NSDestination" ref="1001"/>
<string key="NSLabel">value: appController.requestsController.selection.session</string>
<string key="NSLabel">value: requestsController.selection.session</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">appController.requestsController.selection.session</string>
<string key="NSKeyPath">requestsController.selection.session</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">70</int>
<int key="connectionID">116</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: appController.requestsController.selection.filter</string>
<string key="label">value: requestsController.selection.url</string>
<reference key="source" ref="535759328"/>
<reference key="destination" ref="1001"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="535759328"/>
<reference key="NSDestination" ref="1001"/>
<string key="NSLabel">value: requestsController.selection.url</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">requestsController.selection.url</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">118</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: requestsController.selection.filter</string>
<reference key="source" ref="453653233"/>
<reference key="destination" ref="1001"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="453653233"/>
<reference key="NSDestination" ref="1001"/>
<string key="NSLabel">value: appController.requestsController.selection.filter</string>
<string key="NSLabel">value: requestsController.selection.filter</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">appController.requestsController.selection.filter</string>
<string key="NSKeyPath">requestsController.selection.filter</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">76</int>
<int key="connectionID">120</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: appController.requestsController.selection.url</string>
<reference key="source" ref="535759328"/>
<string key="label">contentArray: requestsController.selection.params</string>
<reference key="source" ref="692961281"/>
<reference key="destination" ref="1001"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="535759328"/>
<reference key="NSSource" ref="692961281"/>
<reference key="NSDestination" ref="1001"/>
<string key="NSLabel">value: appController.requestsController.selection.url</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">appController.requestsController.selection.url</string>
<string key="NSLabel">contentArray: requestsController.selection.params</string>
<string key="NSBinding">contentArray</string>
<string key="NSKeyPath">requestsController.selection.params</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">78</int>
<int key="connectionID">121</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">contentArray: requestsController.selection.renders</string>
<reference key="source" ref="1069352449"/>
<reference key="destination" ref="1001"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="1069352449"/>
<reference key="NSDestination" ref="1001"/>
<string key="NSLabel">contentArray: requestsController.selection.renders</string>
<string key="NSBinding">contentArray</string>
<string key="NSKeyPath">requestsController.selection.renders</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">124</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">attributedString: requestsController.selection.sourceLog.description</string>
<reference key="source" ref="200082955"/>
<reference key="destination" ref="1001"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="200082955"/>
<reference key="NSDestination" ref="1001"/>
<string key="NSLabel">attributedString: requestsController.selection.sourceLog.description</string>
<string key="NSBinding">attributedString</string>
<string key="NSKeyPath">requestsController.selection.sourceLog.description</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">126</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -1315,9 +1313,9 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilderKit</string>
<string>com.apple.InterfaceBuilderKit</string>
<string>{{403, 43}, {417, 675}}</string>
<string>{{406, 57}, {417, 675}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{403, 43}, {417, 675}}</string>
<string>{{406, 57}, {417, 675}}</string>
<boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1379,17 +1377,36 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">78</int>
<int key="maxID">126</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">RequestDetailsController</string>
<string key="superclassName">NSWindowController</string>
<string key="className">LogDocument</string>
<string key="superclassName">NSDocument</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">removeSimilarRequests:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>requestsController</string>
<string>searchField</string>
<string>toolbar</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSArrayController</string>
<string>NSSearchField</string>
<string>NSToolbar</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">RequestDetailsController.h</string>
<string key="minorKey">LogDocument.h</string>
</object>
</object>
</object>
View
@@ -9,18 +9,19 @@
#import <Cocoa/Cocoa.h>
@class AppController;
@class RequestDetailsController;
// @class RequestDetailsController;
@interface LogDocument : NSDocument {
NSArray *requests;
RequestDetailsController *requestDetailsController;
// RequestDetailsController *requestDetailsController;
IBOutlet NSArrayController *requestsController;
IBOutlet NSToolbar *toolbar;
IBOutlet NSSearchField *searchField;
}
@property (assign) NSArray *requests;
@property (assign) NSArrayController *requestsController;
- (IBAction)removeSimilarRequests:(id)sender;
View
@@ -11,7 +11,7 @@
#import "AppController.h"
#import "LogParser.h"
#import "RailsRequest.h"
#import "RequestDetailsController.h"
// #import "RequestDetailsController.h"
static NSString *SearchToolbarItemIdentifier = @"spike.searchField";
@@ -22,15 +22,16 @@ - (void)parseLogFile:(NSData *)data;
@implementation LogDocument
- (void)makeWindowControllers {
[self addWindowController:[[NSWindowController alloc] initWithWindowNibName:@"LogDocument" owner:self]];
[self addWindowController:[[RequestDetailsController alloc] initWithDocument:self]];
// requestDetailsController = ;
// [requestDetailsController showWindow:self];
NSWindowController *documentController = [[NSWindowController alloc] initWithWindowNibName:@"LogDocument" owner:self];
[self addWindowController:documentController];
NSWindowController *detailsController = [[NSWindowController alloc] initWithWindowNibName:@"RequestDetails" owner:self];
[self addWindowController:detailsController];
// [detailsController showWindow:self];
}
@synthesize requests;
@synthesize requestsController;
#pragma mark NSToolbar delegate implementations
@@ -8,14 +8,7 @@
#import <Cocoa/Cocoa.h>
@class AppController;
@interface RequestDetailsController : NSWindowController {
AppController *appController;
}
@property (readonly) AppController *appController;
- (id)initWithAppController:(AppController *)theAppController;
@end
View
@@ -8,17 +8,5 @@
#import "RequestDetailsController.h"
#import "AppController.h"
@implementation RequestDetailsController
- (id)initWithAppController:(AppController *)theAppController {
if( ( self = [super initWithWindowNibName:@"RequestDetails"] ) ) {
appController = theAppController;
}
return self;
}
@synthesize appController;
@end
Oops, something went wrong.

0 comments on commit f3969b5

Please sign in to comment.