Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Lots of work on the doc property editor, plus adding/removing docs.

  • Loading branch information...
commit 286b8b0a9e543dda0ae5346b416ba1ce8f8372f8 1 parent 7ff7e3d
@snej snej authored
View
8 .gitignore
@@ -0,0 +1,8 @@
+.DS_Store
+*.pbxuser
+*.perspectivev3
+*.mode1v3
+*.framework
+xcuserdata/
+build/
+DerivedData/
View
BIN  AppIcon.icns
Binary file not shown
View
38 TouchDB Viewer.xcodeproj/project.pbxproj
@@ -7,8 +7,11 @@
objects = {
/* Begin PBXBuildFile section */
+ 273A4390153C937A00AEC9D7 /* Syncpoint.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 27A8A795152A015B00363704 /* Syncpoint.framework */; };
+ 2765CF7815544FAA0087D810 /* DocEditor.m in Sources */ = {isa = PBXBuildFile; fileRef = 2765CF7715544FAA0087D810 /* DocEditor.m */; };
278B0C6F152A64A900577747 /* DBDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 278B0C6D152A64A900577747 /* DBDocument.m */; };
278B0C72152A6B7C00577747 /* TouchDBDoc.icns in Resources */ = {isa = PBXBuildFile; fileRef = 278B0C71152A6B7C00577747 /* TouchDBDoc.icns */; };
+ 278C85B81554810D0016C7A4 /* JSONFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 278C85B71554810D0016C7A4 /* JSONFormatter.m */; };
27A8A777152A008200363704 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27A8A776152A008200363704 /* Cocoa.framework */; };
27A8A781152A008200363704 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 27A8A77F152A008200363704 /* InfoPlist.strings */; };
27A8A783152A008200363704 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 27A8A782152A008200363704 /* main.m */; };
@@ -18,12 +21,31 @@
27A8A796152A015B00363704 /* Syncpoint.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27A8A795152A015B00363704 /* Syncpoint.framework */; };
27A8A79A152A01FF00363704 /* DBWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 27A8A798152A01FF00363704 /* DBWindowController.m */; };
27A8A79B152A01FF00363704 /* DBWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 27A8A799152A01FF00363704 /* DBWindowController.xib */; };
+ 27F87AFC1555E7FD00F0A416 /* AppIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 27F87AFB1555E7FC00F0A416 /* AppIcon.icns */; };
/* End PBXBuildFile section */
+/* Begin PBXCopyFilesBuildPhase section */
+ 273A438E153C935F00AEC9D7 /* Copy Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ 273A4390153C937A00AEC9D7 /* Syncpoint.framework in Copy Frameworks */,
+ );
+ name = "Copy Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
/* Begin PBXFileReference section */
+ 2765CF7615544FAA0087D810 /* DocEditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocEditor.h; sourceTree = "<group>"; };
+ 2765CF7715544FAA0087D810 /* DocEditor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocEditor.m; sourceTree = "<group>"; };
278B0C6C152A64A900577747 /* DBDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBDocument.h; sourceTree = "<group>"; };
278B0C6D152A64A900577747 /* DBDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DBDocument.m; sourceTree = "<group>"; };
278B0C71152A6B7C00577747 /* TouchDBDoc.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = TouchDBDoc.icns; sourceTree = "<group>"; };
+ 278C85B61554810D0016C7A4 /* JSONFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONFormatter.h; sourceTree = "<group>"; };
+ 278C85B71554810D0016C7A4 /* JSONFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONFormatter.m; sourceTree = "<group>"; };
27A8A772152A008200363704 /* TouchDB Viewer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TouchDB Viewer.app"; sourceTree = BUILT_PRODUCTS_DIR; };
27A8A776152A008200363704 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
27A8A779152A008200363704 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
@@ -41,6 +63,7 @@
27A8A797152A01FF00363704 /* DBWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBWindowController.h; sourceTree = "<group>"; };
27A8A798152A01FF00363704 /* DBWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DBWindowController.m; sourceTree = "<group>"; };
27A8A799152A01FF00363704 /* DBWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DBWindowController.xib; sourceTree = "<group>"; };
+ 27F87AFB1555E7FC00F0A416 /* AppIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = AppIcon.icns; path = ../AppIcon.icns; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -99,12 +122,16 @@
27A8A788152A008200363704 /* AppDelegate.h */,
27A8A789152A008200363704 /* AppDelegate.m */,
27A8A78B152A008200363704 /* MainMenu.xib */,
- 27A8A77D152A008200363704 /* Supporting Files */,
27A8A797152A01FF00363704 /* DBWindowController.h */,
27A8A798152A01FF00363704 /* DBWindowController.m */,
+ 2765CF7615544FAA0087D810 /* DocEditor.h */,
+ 2765CF7715544FAA0087D810 /* DocEditor.m */,
27A8A799152A01FF00363704 /* DBWindowController.xib */,
278B0C6C152A64A900577747 /* DBDocument.h */,
278B0C6D152A64A900577747 /* DBDocument.m */,
+ 278C85B61554810D0016C7A4 /* JSONFormatter.h */,
+ 278C85B71554810D0016C7A4 /* JSONFormatter.m */,
+ 27A8A77D152A008200363704 /* Supporting Files */,
);
path = "TouchDB Viewer";
sourceTree = "<group>";
@@ -112,6 +139,7 @@
27A8A77D152A008200363704 /* Supporting Files */ = {
isa = PBXGroup;
children = (
+ 27F87AFB1555E7FC00F0A416 /* AppIcon.icns */,
278B0C71152A6B7C00577747 /* TouchDBDoc.icns */,
27A8A77E152A008200363704 /* TouchDB Viewer-Info.plist */,
27A8A77F152A008200363704 /* InfoPlist.strings */,
@@ -132,6 +160,7 @@
27A8A76E152A008200363704 /* Sources */,
27A8A76F152A008200363704 /* Frameworks */,
27A8A770152A008200363704 /* Resources */,
+ 273A438E153C935F00AEC9D7 /* Copy Frameworks */,
);
buildRules = (
);
@@ -178,6 +207,7 @@
27A8A78D152A008200363704 /* MainMenu.xib in Resources */,
27A8A79B152A01FF00363704 /* DBWindowController.xib in Resources */,
278B0C72152A6B7C00577747 /* TouchDBDoc.icns in Resources */,
+ 27F87AFC1555E7FD00F0A416 /* AppIcon.icns in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -192,6 +222,8 @@
27A8A78A152A008200363704 /* AppDelegate.m in Sources */,
27A8A79A152A01FF00363704 /* DBWindowController.m in Sources */,
278B0C6F152A64A900577747 /* DBDocument.m in Sources */,
+ 2765CF7815544FAA0087D810 /* DocEditor.m in Sources */,
+ 278C85B81554810D0016C7A4 /* JSONFormatter.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -232,6 +264,7 @@
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
+ CURRENT_PROJECT_VERSION = 0.1;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@@ -250,6 +283,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
+ VERSIONING_SYSTEM = "apple-generic";
WARNING_CFLAGS = "-Wall";
};
name = Debug;
@@ -261,6 +295,7 @@
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
+ CURRENT_PROJECT_VERSION = 0.1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@@ -272,6 +307,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
+ VERSIONING_SYSTEM = "apple-generic";
WARNING_CFLAGS = "-Wall";
};
name = Release;
View
7 TouchDB Viewer.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:TouchDB Viewer.xcodeproj">
+ </FileRef>
+</Workspace>
View
BIN  TouchDB Viewer/AppIcon.icns
Binary file not shown
View
1  TouchDB Viewer/DBDocument.h
@@ -8,6 +8,7 @@
#import <Cocoa/Cocoa.h>
+/** NSDocument subclass that manages a TouchDB database file. */
@interface DBDocument : NSDocument
@end
View
6 TouchDB Viewer/DBDocument.m
@@ -45,4 +45,10 @@ - (BOOL)readFromURL:(NSURL *)absoluteURL
}
+- (void) close {
+ [(CouchTouchDBServer*)_db.server close];
+ [super close];
+}
+
+
@end
View
12 TouchDB Viewer/DBWindowController.h
@@ -7,11 +7,21 @@
//
#import <Cocoa/Cocoa.h>
-@class CouchDatabase;
+@class CouchDatabase, DocEditor;
@interface DBWindowController : NSWindowController
- (id)initWithDatabase: (CouchDatabase*)db;
+- (NSArray*) selectedDocuments;
+- (BOOL) selectDocument: (CouchDocument*)doc;
+
+- (IBAction) newDocument: (id)sender;
+- (IBAction) deleteDocument: (id)sender;
+
+- (BOOL) hasColumnForProperty: (NSString*)property;
+- (void) addColumnForProperty: (NSString*)property;
+- (void) removeColumnForProperty: (NSString*)property;
+
@end
View
275 TouchDB Viewer/DBWindowController.m
@@ -7,6 +7,7 @@
//
#import "DBWindowController.h"
+#import "DocEditor.h"
@interface DBWindowController () <NSOutlineViewDataSource>
@@ -16,13 +17,12 @@ @interface DBWindowController () <NSOutlineViewDataSource>
NSString* _dbPath;
CouchLiveQuery* _query;
NSMutableArray* _rows;
- CouchQueryRow* _selRow;
- NSMutableArray* _selRowKeys;
+ IBOutlet DocEditor* _docEditor;
IBOutlet NSTabView* _tabs;
IBOutlet NSTextField* _infoField;
IBOutlet NSOutlineView* _docsOutline;
- IBOutlet NSTableView* _propertyTable;
+ IBOutlet NSButton *_addDocButton, *_removeDocButton;
}
@property (readonly, nonatomic) NSString* dbPath;
@@ -34,9 +34,6 @@ @interface DBWindowController () <NSOutlineViewDataSource>
@implementation DBWindowController
-static NSMutableArray* sControllers;
-
-
@synthesize dbPath=_dbPath;
@@ -46,12 +43,10 @@ - (id)initWithDatabase: (CouchDatabase*)db
if (self) {
_db = db;
_query = [_db.getAllDocuments asLiveQuery];
- [_query addObserver: self forKeyPath: @"rows" options: NSKeyValueObservingOptionInitial context: NULL];
-
- // This keeps me from being dealloced under ARC. (Is there a better way?)
- if (!sControllers)
- sControllers = [NSMutableArray array];
- [sControllers addObject: self];
+ _query.prefetch = _query.sequences = YES;
+ [_query addObserver: self forKeyPath: @"rows"
+ options: NSKeyValueObservingOptionInitial
+ context: NULL];
}
return self;
}
@@ -59,11 +54,14 @@ - (id)initWithDatabase: (CouchDatabase*)db
- (void)dealloc
{
- NSLog(@"DEALLOC %@", self);
+ [_query removeObserver: self forKeyPath: @"rows"];
}
- (void) windowDidLoad {
+ _docEditor.database = _db;
+
+ // Set up the window title:
if (_dbPath) {
self.window.title = _dbPath.lastPathComponent;
self.window.representedFilename = _dbPath;
@@ -80,32 +78,86 @@ - (void) windowDidLoad {
}
-- (void)windowWillClose:(NSNotification *)notification {
- [sControllers removeObject: self];
-}
-
-
- (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object
change:(NSDictionary *)change context:(void *)context
{
if (object == _query) {
- NSLog(@"------ Rows Changed -----");
+ NSArray* selection;
+ CouchDocument* editedDoc = _docEditor.revision.document;
+ if (editedDoc)
+ selection = [NSArray arrayWithObject: editedDoc];
+ else
+ selection = self.selectedDocuments;
+
CouchQueryEnumerator* rows = _query.rows;
_rows = rows.allObjects.mutableCopy;
+ if (_docsOutline.sortDescriptors)
+ [_rows sortUsingDescriptors: _docsOutline.sortDescriptors];
[_docsOutline reloadItem: nil];
_infoField.stringValue = [NSString stringWithFormat: @"%lld docs — sequence #%lld",
_rows.count, rows.sequenceNumber];
+
+ self.selectedDocuments = selection;
}
}
-- (void) outlineView:(NSOutlineView *)outlineView sortDescriptorsDidChange:(NSArray *)oldDescriptors {
+- (void) outlineView:(NSOutlineView *)outlineView
+ sortDescriptorsDidChange:(NSArray *)oldDescriptors {
[_rows sortUsingDescriptors: outlineView.sortDescriptors];
[outlineView reloadItem: nil];
}
-#pragma mark - OUTLINE VIEW:
+- (NSArray*) selectedRows {
+ NSIndexSet* selIndexes = [_docsOutline selectedRowIndexes];
+ NSUInteger count = selIndexes.count;
+ NSMutableArray* sel = [NSMutableArray arrayWithCapacity: count];
+ [selIndexes enumerateIndexesUsingBlock: ^(NSUInteger idx, BOOL *stop) {
+ CouchQueryRow* item = [self queryRowForItem: [_docsOutline itemAtRow: idx]];
+ [sel addObject: item];
+ }];
+ return sel;
+}
+
+
+- (NSArray*) selectedDocuments {
+ NSMutableArray* docs = [NSMutableArray array];
+ for (CouchQueryRow* row in self.selectedRows)
+ [docs addObject: row.document];
+ return docs;
+}
+
+
+- (void) setSelectedDocuments: (NSArray*)sel {
+ NSMutableIndexSet* selIndexes = [NSMutableIndexSet indexSet];
+ for (CouchDocument* doc in sel) {
+ CouchQueryRow* queryRow = [self queryRowForDocument: doc];
+ if (queryRow) {
+ int row = [_docsOutline rowForItem: [self itemForQueryRow: queryRow]];
+ if (row >= 0)
+ [selIndexes addIndex: row];
+ }
+ }
+ [_docsOutline selectRowIndexes: selIndexes byExtendingSelection: NO];
+}
+
+
+- (BOOL) selectDocument: (CouchDocument*)doc {
+ CouchQueryRow* queryRow = [self queryRowForDocument: doc];
+ if (queryRow) {
+ int row = [_docsOutline rowForItem: [self itemForQueryRow: queryRow]];
+ if (row >= 0) {
+ [_docsOutline selectRowIndexes: [NSIndexSet indexSetWithIndex: row]
+ byExtendingSelection: NO];
+ return YES;
+ }
+ }
+ return NO;
+}
+
+
+#pragma mark - DOCUMENT-LIST VIEW:
- (CouchQueryRow*) queryRowForItem: (id)item {
@@ -120,6 +172,16 @@ - (id) itemForQueryRow: (CouchQueryRow*)row {
}
+- (CouchQueryRow*) queryRowForDocument: (CouchDocument*)doc {
+ NSString* docID = doc.documentID;
+ for (CouchQueryRow* row in _rows) {
+ if ([row.documentID isEqualToString: docID])
+ return row;
+ }
+ return nil;
+}
+
+
static NSString* formatRevision( NSString* revID ) {
if (revID.length >= 2 && [revID characterAtIndex: 1] == '-')
revID = [@" " stringByAppendingString: revID];
@@ -135,18 +197,24 @@ - (id)outlineView:(NSOutlineView *)outlineView
objectValueForTableColumn:(NSTableColumn *)tableColumn
byItem:(id)item
{
- //NSLog(@"value(%@) of %@", tableColumn.identifier, item);
CouchQueryRow* row = [self queryRowForItem: item];
+ NSString* identifier = tableColumn.identifier;
- static NSArray* kColumnIDs;
- if (!kColumnIDs)
- kColumnIDs = [NSArray arrayWithObjects: @"id", @"rev", @"seq", @"json", nil];
- switch ([kColumnIDs indexOfObject: tableColumn.identifier]) {
- case 0: return row.documentID;
- case 1: return formatRevision(row.documentRevision);
- case 2: return @"?"; // TODO: Local sequence #
- case 3: return formatProperties(row.document.userProperties);
- default:return @"???";
+ if ([identifier hasPrefix: @"."]) {
+ NSString* property = [identifier substringFromIndex: 1];
+ id value = [row.documentProperties objectForKey: property];
+ return formatProperties(value);
+ } else {
+ static NSArray* kColumnIDs;
+ if (!kColumnIDs)
+ kColumnIDs = [NSArray arrayWithObjects: @"id", @"rev", @"seq", @"json", nil];
+ switch ([kColumnIDs indexOfObject: identifier]) {
+ case 0: return row.documentID;
+ case 1: return formatRevision(row.documentRevision);
+ case 2: return [NSNumber numberWithUnsignedLongLong: row.localSequence];
+ case 3: return formatProperties(row.document.userProperties);
+ default:return @"???";
+ }
}
}
@@ -165,7 +233,6 @@ - (NSInteger)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id
- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(id)item {
- //NSLog(@"child[%ld] of %@", index, item);
if (item == nil)
return [self itemForQueryRow: [_rows objectAtIndex: index]];
else
@@ -173,48 +240,140 @@ - (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(id
}
+- (BOOL)selectionShouldChangeInOutlineView:(NSOutlineView *)outlineView {
+ return [_docEditor saveDocument];
+}
+
+
- (void)outlineViewSelectionDidChange:(NSNotification *)notification {
- int row = [_docsOutline selectedRow];
- id item = row >= 0 ? [_docsOutline itemAtRow: row] : nil;
- CouchQueryRow* sel = item ? [self queryRowForItem: item] : nil;
- [self setSelectedRow: sel];
+ [self enableDocumentButtons];
+
+ CouchQueryRow* sel = nil;
+ NSIndexSet* selRows = [_docsOutline selectedRowIndexes];
+ if (selRows.count == 1) {
+ id item = [_docsOutline itemAtRow: [selRows firstIndex]];
+ sel = item ? [self queryRowForItem: item] : nil;
+ }
+ [_docEditor setRevision: sel.document.currentRevision];
+}
+
+
+#pragma mark - CUSTOM COLUMNS:
+
+
+static int jsonObjectRank(id a) {
+ if (a == nil)
+ return 0;
+ if (a == (id)kCFNull)
+ return 1;
+ if (a == (id)kCFBooleanTrue || a == (id)kCFBooleanFalse)
+ return 2;
+ if ([a isKindOfClass: [NSNumber class]])
+ return 3;
+ if ([a isKindOfClass: [NSString class]])
+ return 4;
+ if ([a isKindOfClass: [NSArray class]])
+ return 5;
+ return 6;
}
+static NSComparisonResult jsonCompare(id a, id b) {
+ if (a == b)
+ return 0;
+ int rankDelta = jsonObjectRank(a) - jsonObjectRank(b);
+ if (rankDelta != 0)
+ return rankDelta;
+ else
+ return [a compare: b];
+}
+
-#pragma mark - ROW TABLE VIEW:
+- (BOOL) hasColumnForProperty: (NSString*)property {
+ NSString* identifier = [@"." stringByAppendingString: property];
+ return [_docsOutline tableColumnWithIdentifier: identifier] != nil;
+}
-- (void) setSelectedRow: (CouchQueryRow*)row {
- if (row != _selRow) {
- _selRow = row;
- _selRowKeys = row.document.properties.allKeys.mutableCopy;
- [_selRowKeys sortUsingComparator: ^NSComparisonResult(NSString* key1, NSString* key2) {
- int n = ([key2 hasPrefix: @"_"] != 0) - ([key1 hasPrefix: @"_"] != 0);
- if (n)
- return n;
- return [key1 caseInsensitiveCompare: key2];
- }];
- [_propertyTable reloadData];
+- (void) addColumnForProperty: (NSString*)property {
+ NSString* identifier = [@"." stringByAppendingString: property];
+ if (![_docsOutline tableColumnWithIdentifier: identifier]) {
+ NSTableColumn* col = [[NSTableColumn alloc] initWithIdentifier: identifier];
+ [col.headerCell setStringValue: identifier];
+ NSTableColumn* jsonCol = [_docsOutline tableColumnWithIdentifier: @"json"];
+ [col.dataCell setFont: [jsonCol.dataCell font]];
+
+ NSString* sortKey = [@"documentProperties." stringByAppendingString: property];
+ col.sortDescriptorPrototype = [NSSortDescriptor sortDescriptorWithKey: sortKey
+ ascending:YES
+ comparator:^NSComparisonResult(id obj1, id obj2) {
+ return jsonCompare(obj1, obj2);
+ }];
+
+
+ [_docsOutline addTableColumn: col];
+ NSUInteger index = [_docsOutline.tableColumns indexOfObject: col];
+ [_docsOutline moveColumn: index toColumn: _docsOutline.tableColumns.count - 2];
}
}
-- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView {
- return _selRowKeys.count;
+- (void) removeColumnForProperty: (NSString*)property {
+ NSString* identifier = [@"." stringByAppendingString: property];
+ NSTableColumn* col = [_docsOutline tableColumnWithIdentifier: identifier];
+ if (col)
+ [_docsOutline removeTableColumn: col];
}
-- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn
- row:(NSInteger)row
-{
- id result = [_selRowKeys objectAtIndex: row];
- if (![tableColumn.identifier isEqualToString: @"key"]) {
- result = [_selRow.document.properties objectForKey: result];
- result = [RESTBody stringWithJSONObject: result];
+
+
+#pragma mark - ACTIONS:
+
+
+- (void) enableDocumentButtons {
+ [_removeDocButton setEnabled: (_docsOutline.selectedRow >= 0)];
+}
+
+
+- (IBAction) newDocument: (id)sender {
+ [_docsOutline selectRowIndexes: nil byExtendingSelection: NO];
+ [_docEditor editNewDocument];
+}
+
+
+- (IBAction) deleteDocument: (id)sender {
+ NSArray* sel = self.selectedDocuments;
+ if (sel.count == 0) {
+ NSBeep();
+ return;
+ }
+ NSError* error;
+ if (![[_db deleteDocuments: sel] wait: &error]) {
+ [self presentError: error];
}
- return result;
}
+- (void) keyDown: (NSEvent*)ev {
+ if (ev.type == NSKeyDown) {
+ NSString* keys = ev.characters;
+ if (keys.length == 1) {
+ unichar key = [keys characterAtIndex: 0];
+ if (key == 0x7F || key == NSDeleteCharFunctionKey) {
+ // Delete key -- delete from focused table view:
+ NSResponder* responder = [self.window firstResponder];
+ if (responder == _docsOutline) {
+ [self deleteDocument: self];
+ return;
+ } else if (responder == _docEditor.tableView) {
+ [_docEditor removeProperty: self];
+ return;
+ }
+ }
+ }
+ }
+ NSBeep();
+}
+
@end
View
1,268 TouchDB Viewer/DBWindowController.xib
@@ -14,8 +14,12 @@
<string>NSScroller</string>
<string>NSSplitView</string>
<string>NSTableHeaderView</string>
+ <string>NSButton</string>
<string>NSScrollView</string>
<string>NSTextFieldCell</string>
+ <string>NSButtonCell</string>
+ <string>NSMenu</string>
+ <string>NSMenuItem</string>
<string>NSTableView</string>
<string>IBNSLayoutConstraint</string>
<string>NSOutlineView</string>
@@ -23,7 +27,6 @@
<string>NSView</string>
<string>NSWindowTemplate</string>
<string>NSTableColumn</string>
- <string>NSTextField</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -45,7 +48,7 @@
<object class="NSWindowTemplate" id="1005">
<int key="NSWindowStyleMask">15</int>
<int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{196, 240}, {575, 422}}</string>
+ <string key="NSWindowRect">{{196, 240}, {603, 412}}</string>
<int key="NSWTFlags">544735232</int>
<string key="NSWindowTitle">Window</string>
<string key="NSWindowClass">NSWindow</string>
@@ -70,16 +73,16 @@
<object class="NSOutlineView" id="417721070">
<reference key="NSNextResponder" ref="252304245"/>
<int key="NSvFlags">4352</int>
- <string key="NSFrameSize">{335, 384}</string>
+ <string key="NSFrameSize">{357, 374}</string>
<reference key="NSSuperview" ref="252304245"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="890457675"/>
+ <reference key="NSNextKeyView" ref="832127522"/>
<string key="NSReuseIdentifierKey">_NS:13</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTableHeaderView" key="NSHeaderView" id="862731171">
<reference key="NSNextResponder" ref="890457675"/>
<int key="NSvFlags">256</int>
- <string key="NSFrameSize">{335, 17}</string>
+ <string key="NSFrameSize">{357, 17}</string>
<reference key="NSSuperview" ref="890457675"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="252304245"/>
@@ -94,23 +97,28 @@
<string key="NSReuseIdentifierKey">_NS:18</string>
</object>
<array class="NSMutableArray" key="NSTableColumns">
- <object class="NSTableColumn" id="85036781">
- <string key="NSIdentifier">id</string>
- <double key="NSWidth">58</double>
- <double key="NSMinWidth">16</double>
- <double key="NSMaxWidth">1000</double>
+ <object class="NSTableColumn" id="669953691">
+ <string key="NSIdentifier">seq</string>
+ <double key="NSWidth">63</double>
+ <double key="NSMinWidth">50</double>
+ <double key="NSMaxWidth">100</double>
<object class="NSTableHeaderCell" key="NSHeaderCell">
<int key="NSCellFlags">75628096</int>
- <int key="NSCellFlags2">2048</int>
- <string key="NSContents">Doc ID</string>
+ <int key="NSCellFlags2">67110912</int>
+ <string key="NSContents">Seq</string>
<object class="NSFont" key="NSSupport" id="26">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">11</double>
<int key="NSfFlags">3100</int>
</object>
- <object class="NSColor" key="NSBackgroundColor" id="468692937">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
+ <object class="NSColor" key="NSBackgroundColor" id="326816111">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">headerColor</string>
+ <object class="NSColor" key="NSColor" id="690391468">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
</object>
<object class="NSColor" key="NSTextColor" id="108955689">
<int key="NSColorSpace">6</int>
@@ -122,13 +130,13 @@
</object>
</object>
</object>
- <object class="NSTextFieldCell" key="NSDataCell" id="1068775054">
+ <object class="NSTextFieldCell" key="NSDataCell" id="530224180">
<int key="NSCellFlags">337772096</int>
- <int key="NSCellFlags2">2048</int>
+ <int key="NSCellFlags2">67110912</int>
<string key="NSContents">Text Cell</string>
- <object class="NSFont" key="NSSupport" id="560784986">
- <string key="NSName">Menlo-Regular</string>
- <double key="NSSize">10</double>
+ <object class="NSFont" key="NSSupport" id="302414323">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">11</double>
<int key="NSfFlags">16</int>
</object>
<reference key="NSControlView" ref="417721070"/>
@@ -136,7 +144,7 @@
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlBackgroundColor</string>
- <object class="NSColor" key="NSColor" id="919037049">
+ <object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
@@ -150,7 +158,44 @@
</object>
<int key="NSResizingMask">3</int>
<bool key="NSIsResizeable">YES</bool>
- <bool key="NSIsEditable">YES</bool>
+ <reference key="NSTableView" ref="417721070"/>
+ <object class="NSSortDescriptor" key="NSSortDescriptorPrototype" id="115206826">
+ <string key="NSKey">localSequence</string>
+ <bool key="NSAscending">YES</bool>
+ <string key="NSSelector">compare:</string>
+ </object>
+ </object>
+ <object class="NSTableColumn" id="85036781">
+ <string key="NSIdentifier">id</string>
+ <double key="NSWidth">80</double>
+ <double key="NSMinWidth">40</double>
+ <double key="NSMaxWidth">1000</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628096</int>
+ <int key="NSCellFlags2">2048</int>
+ <string key="NSContents">Doc ID</string>
+ <reference key="NSSupport" ref="26"/>
+ <object class="NSColor" key="NSBackgroundColor" id="468692937">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
+ </object>
+ <reference key="NSTextColor" ref="108955689"/>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="1068775054">
+ <int key="NSCellFlags">337772096</int>
+ <int key="NSCellFlags2">2048</int>
+ <string key="NSContents">Text Cell</string>
+ <object class="NSFont" key="NSSupport" id="560784986">
+ <string key="NSName">Menlo-Regular</string>
+ <double key="NSSize">10</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <reference key="NSControlView" ref="417721070"/>
+ <reference key="NSBackgroundColor" ref="563754897"/>
+ <reference key="NSTextColor" ref="279535042"/>
+ </object>
+ <int key="NSResizingMask">3</int>
+ <bool key="NSIsResizeable">YES</bool>
<reference key="NSTableView" ref="417721070"/>
<object class="NSSortDescriptor" key="NSSortDescriptorPrototype">
<string key="NSKey">documentID</string>
@@ -160,7 +205,7 @@
</object>
<object class="NSTableColumn" id="529177016">
<string key="NSIdentifier">rev</string>
- <double key="NSWidth">53</double>
+ <double key="NSWidth">60</double>
<double key="NSMinWidth">40</double>
<double key="NSMaxWidth">1000</double>
<object class="NSTableHeaderCell" key="NSHeaderCell">
@@ -182,7 +227,6 @@
</object>
<int key="NSResizingMask">3</int>
<bool key="NSIsResizeable">YES</bool>
- <bool key="NSIsEditable">YES</bool>
<reference key="NSTableView" ref="417721070"/>
<object class="NSSortDescriptor" key="NSSortDescriptorPrototype">
<string key="NSKey">documentRevision</string>
@@ -192,7 +236,7 @@
</object>
<object class="NSTableColumn" id="876443600">
<string key="NSIdentifier">json</string>
- <double key="NSWidth">215</double>
+ <double key="NSWidth">141.76171875</double>
<double key="NSMinWidth">10</double>
<double key="NSMaxWidth">3.4028234663852886e+38</double>
<object class="NSTableHeaderCell" key="NSHeaderCell">
@@ -200,33 +244,20 @@
<int key="NSCellFlags2">2048</int>
<string key="NSContents">Contents</string>
<reference key="NSSupport" ref="26"/>
- <object class="NSColor" key="NSBackgroundColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">headerColor</string>
- <object class="NSColor" key="NSColor" id="690391468">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
- </object>
+ <reference key="NSBackgroundColor" ref="326816111"/>
<reference key="NSTextColor" ref="108955689"/>
</object>
<object class="NSTextFieldCell" key="NSDataCell" id="806223633">
<int key="NSCellFlags">337772096</int>
<int key="NSCellFlags2">2048</int>
<string key="NSContents">Text Cell</string>
- <object class="NSFont" key="NSSupport">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">11</double>
- <int key="NSfFlags">16</int>
- </object>
+ <reference key="NSSupport" ref="302414323"/>
<reference key="NSControlView" ref="417721070"/>
<reference key="NSBackgroundColor" ref="563754897"/>
<reference key="NSTextColor" ref="279535042"/>
</object>
<int key="NSResizingMask">3</int>
<bool key="NSIsResizeable">YES</bool>
- <bool key="NSIsEditable">YES</bool>
<reference key="NSTableView" ref="417721070"/>
</object>
</array>
@@ -243,10 +274,13 @@
</object>
</object>
<double key="NSRowHeight">14</double>
- <int key="NSTvFlags">-624918528</int>
+ <int key="NSTvFlags">-624951296</int>
<reference key="NSDelegate"/>
<reference key="NSDataSource"/>
- <int key="NSColumnAutoresizingStyle">1</int>
+ <array key="NSSortDescriptors">
+ <reference ref="115206826"/>
+ </array>
+ <int key="NSColumnAutoresizingStyle">3</int>
<int key="NSDraggingSourceMaskForLocal">15</int>
<int key="NSDraggingSourceMaskForNonLocal">0</int>
<bool key="NSAllowsTypeSelect">YES</bool>
@@ -255,7 +289,7 @@
<bool key="NSOutlineViewAutoresizesOutlineColumnKey">NO</bool>
</object>
</array>
- <string key="NSFrame">{{1, 17}, {335, 384}}</string>
+ <string key="NSFrame">{{1, 17}, {357, 374}}</string>
<reference key="NSSuperview" ref="42718253"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="417721070"/>
@@ -280,7 +314,7 @@
<object class="NSScroller" id="383568787">
<reference key="NSNextResponder" ref="42718253"/>
<int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{1, 349}, {480, 15}}</string>
+ <string key="NSFrame">{{1, 376}, {357, 15}}</string>
<reference key="NSSuperview" ref="42718253"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="654859663"/>
@@ -288,7 +322,7 @@
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="42718253"/>
<string key="NSAction">_doScroller:</string>
- <double key="NSPercent">0.99173553719008267</double>
+ <double key="NSPercent">0.9972067039106145</double>
</object>
<object class="NSClipView" id="890457675">
<reference key="NSNextResponder" ref="42718253"/>
@@ -296,7 +330,7 @@
<array class="NSMutableArray" key="NSSubviews">
<reference ref="862731171"/>
</array>
- <string key="NSFrame">{{1, 0}, {335, 17}}</string>
+ <string key="NSFrame">{{1, 0}, {357, 17}}</string>
<reference key="NSSuperview" ref="42718253"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="862731171"/>
@@ -306,10 +340,10 @@
<int key="NScvFlags">4</int>
</object>
</array>
- <string key="NSFrameSize">{337, 402}</string>
+ <string key="NSFrameSize">{359, 392}</string>
<reference key="NSSuperview" ref="967525427"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="252304245"/>
+ <reference key="NSNextKeyView" ref="890457675"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="NSsFlags">133682</int>
<reference key="NSVScroller" ref="832127522"/>
@@ -329,16 +363,16 @@
<object class="NSTableView" id="303258537">
<reference key="NSNextResponder" ref="483783956"/>
<int key="NSvFlags">4352</int>
- <string key="NSFrameSize">{226, 384}</string>
+ <string key="NSFrameSize">{232, 374}</string>
<reference key="NSSuperview" ref="483783956"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="597025874"/>
+ <reference key="NSNextKeyView" ref="542141625"/>
<string key="NSReuseIdentifierKey">_NS:13</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTableHeaderView" key="NSHeaderView" id="201207143">
<reference key="NSNextResponder" ref="597025874"/>
<int key="NSvFlags">256</int>
- <string key="NSFrameSize">{226, 17}</string>
+ <string key="NSFrameSize">{232, 17}</string>
<reference key="NSSuperview" ref="597025874"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="483783956"/>
@@ -388,7 +422,7 @@
<reference key="NSTableView" ref="303258537"/>
</object>
<object class="NSTableColumn" id="252446507">
- <double key="NSWidth">148</double>
+ <double key="NSWidth">154</double>
<double key="NSMinWidth">40</double>
<double key="NSMaxWidth">1000</double>
<object class="NSTableHeaderCell" key="NSHeaderCell">
@@ -430,7 +464,7 @@
<int key="NSTableViewGroupRowStyle">1</int>
</object>
</array>
- <string key="NSFrame">{{1, 17}, {226, 384}}</string>
+ <string key="NSFrame">{{1, 17}, {232, 374}}</string>
<reference key="NSSuperview" ref="654859663"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="303258537"/>
@@ -458,6 +492,7 @@
<string key="NSFrame">{{1, 119}, {223, 15}}</string>
<reference key="NSSuperview" ref="654859663"/>
<reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="159169962"/>
<string key="NSReuseIdentifierKey">_NS:60</string>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="654859663"/>
@@ -470,7 +505,7 @@
<array class="NSMutableArray" key="NSSubviews">
<reference ref="201207143"/>
</array>
- <string key="NSFrame">{{1, 0}, {226, 17}}</string>
+ <string key="NSFrame">{{1, 0}, {232, 17}}</string>
<reference key="NSSuperview" ref="654859663"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="201207143"/>
@@ -480,10 +515,10 @@
<int key="NScvFlags">4</int>
</object>
</array>
- <string key="NSFrame">{{347, 0}, {228, 402}}</string>
+ <string key="NSFrame">{{369, 0}, {234, 392}}</string>
<reference key="NSSuperview" ref="967525427"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="483783956"/>
+ <reference key="NSNextKeyView" ref="597025874"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="NSsFlags">133682</int>
<reference key="NSVScroller" ref="542141625"/>
@@ -493,46 +528,216 @@
<bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
</object>
</array>
- <string key="NSFrame">{{0, 21}, {575, 402}}</string>
+ <string key="NSFrame">{{0, 21}, {603, 392}}</string>
<reference key="NSSuperview" ref="1006"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="42718253"/>
<bool key="NSIsVertical">YES</bool>
<int key="NSDividerStyle">3</int>
</object>
- <object class="NSTextField" id="452264918">
+ <object class="NSButton" id="791694264">
<reference key="NSNextResponder" ref="1006"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{3, 3}, {334, 14}}</string>
+ <string key="NSFrame">{{376, 0}, {21, 21}}</string>
<reference key="NSSuperview" ref="1006"/>
<reference key="NSWindow"/>
- <string key="NSReuseIdentifierKey">_NS:1505</string>
+ <reference key="NSNextKeyView" ref="575264688"/>
+ <string key="NSReuseIdentifierKey">_NS:22</string>
<bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="254871633">
- <int key="NSCellFlags">68288064</int>
- <int key="NSCellFlags2">4326400</int>
- <string key="NSContents">INFO</string>
- <reference key="NSSupport" ref="26"/>
- <string key="NSCellIdentifier">_NS:1505</string>
- <reference key="NSControlView" ref="452264918"/>
- <object class="NSColor" key="NSBackgroundColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">controlColor</string>
- <reference key="NSColor" ref="919037049"/>
+ <object class="NSButtonCell" key="NSCell" id="1072978031">
+ <int key="NSCellFlags">-1543373312</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents"/>
+ <object class="NSFont" key="NSSupport" id="509084995">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <string key="NSCellIdentifier">_NS:22</string>
+ <reference key="NSControlView" ref="791694264"/>
+ <int key="NSButtonFlags">-2033434369</int>
+ <int key="NSButtonFlags2">162</int>
+ <object class="NSCustomResource" key="NSNormalImage" id="842508768">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSAddTemplate</string>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
+ <object class="NSButton" id="575264688">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{399, 0}, {21, 21}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="880618563"/>
+ <string key="NSReuseIdentifierKey">_NS:22</string>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="588214969">
+ <int key="NSCellFlags">-1543373312</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="509084995"/>
+ <string key="NSCellIdentifier">_NS:22</string>
+ <reference key="NSControlView" ref="575264688"/>
+ <int key="NSButtonFlags">-2033434369</int>
+ <int key="NSButtonFlags2">162</int>
+ <object class="NSCustomResource" key="NSNormalImage" id="912369287">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSRemoveTemplate</string>
</object>
- <reference key="NSTextColor" ref="279535042"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
+ <object class="NSButton" id="159169962">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{8, 0}, {21, 21}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="818211244"/>
+ <string key="NSReuseIdentifierKey">_NS:22</string>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="985993223">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="509084995"/>
+ <string key="NSCellIdentifier">_NS:22</string>
+ <reference key="NSControlView" ref="159169962"/>
+ <int key="NSButtonFlags">-2033434369</int>
+ <int key="NSButtonFlags2">162</int>
+ <reference key="NSNormalImage" ref="842508768"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
+ <object class="NSButton" id="818211244">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{32, 0}, {21, 21}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="791694264"/>
+ <string key="NSReuseIdentifierKey">_NS:22</string>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="413633034">
+ <int key="NSCellFlags">-1543373312</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="509084995"/>
+ <string key="NSCellIdentifier">_NS:22</string>
+ <reference key="NSControlView" ref="818211244"/>
+ <int key="NSButtonFlags">-2033434369</int>
+ <int key="NSButtonFlags2">162</int>
+ <reference key="NSNormalImage" ref="912369287"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
+ <object class="NSButton" id="572768367">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">-2147483380</int>
+ <string key="NSFrame">{{550, 1}, {38, 17}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="440119481">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">134348800</int>
+ <string key="NSContents">Save</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSCellIdentifier">_NS:9</string>
+ <reference key="NSControlView" ref="572768367"/>
+ <int key="NSButtonFlags">-2038152961</int>
+ <int key="NSButtonFlags2">164</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
+ <object class="NSButton" id="880618563">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">-2147483380</int>
+ <string key="NSFrame">{{494, 1}, {48, 17}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="572768367"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="361786960">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">134348800</int>
+ <string key="NSContents">Revert</string>
+ <reference key="NSSupport" ref="26"/>
+ <string key="NSCellIdentifier">_NS:9</string>
+ <reference key="NSControlView" ref="880618563"/>
+ <int key="NSButtonFlags">-2038152961</int>
+ <int key="NSButtonFlags2">164</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
</object>
</object>
</array>
- <string key="NSFrameSize">{575, 422}</string>
+ <string key="NSFrameSize">{603, 412}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="967525427"/>
</object>
- <string key="NSScreenRect">{{0, 0}, {2560, 1578}}</string>
+ <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
+ <bool key="NSAutorecalculatesContentBorderThicknessMinY">NO</bool>
+ <double key="NSContentBorderThicknessMinY">22</double>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
+ <object class="NSCustomObject" id="471964374">
+ <string key="NSClassName">DocEditor</string>
+ </object>
+ <object class="NSCustomObject" id="753481486">
+ <string key="NSClassName">JSONFormatter</string>
+ </object>
+ <object class="NSMenu" id="680718563">
+ <string key="NSTitle"/>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="266857441">
+ <reference key="NSMenu" ref="680718563"/>
+ <string key="NSTitle">Add As Column</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <object class="NSCustomResource" key="NSOnImage" id="614958399">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuCheckmark</string>
+ </object>
+ <object class="NSCustomResource" key="NSMixedImage" id="218241088">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuMixedState</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="909997835">
+ <reference key="NSMenu" ref="680718563"/>
+ <string key="NSTitle">Delete Property</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="614958399"/>
+ <reference key="NSMixedImage" ref="218241088"/>
+ </object>
+ </array>
+ </object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
@@ -562,11 +767,75 @@
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">_infoField</string>
+ <string key="label">addPropertyButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="791694264"/>
+ </object>
+ <int key="connectionID">434</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">removePropertyButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="575264688"/>
+ </object>
+ <int key="connectionID">435</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">_addPropertyButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="791694264"/>
+ </object>
+ <int key="connectionID">436</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">_removePropertyButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="575264688"/>
+ </object>
+ <int key="connectionID">437</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">_addDocButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="159169962"/>
+ </object>
+ <int key="connectionID">500</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">_removeDocButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="818211244"/>
+ </object>
+ <int key="connectionID">501</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">newDocument:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="159169962"/>
+ </object>
+ <int key="connectionID">502</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">deleteDocument:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="818211244"/>
+ </object>
+ <int key="connectionID">503</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">_docEditor</string>
<reference key="source" ref="1001"/>
- <reference key="destination" ref="452264918"/>
+ <reference key="destination" ref="471964374"/>
</object>
- <int key="connectionID">373</int>
+ <int key="connectionID">505</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
@@ -596,17 +865,137 @@
<object class="IBOutletConnection" key="connection">
<string key="label">dataSource</string>
<reference key="source" ref="303258537"/>
- <reference key="destination" ref="1001"/>
+ <reference key="destination" ref="471964374"/>
</object>
- <int key="connectionID">218</int>
+ <int key="connectionID">515</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="303258537"/>
+ <reference key="destination" ref="471964374"/>
+ </object>
+ <int key="connectionID">516</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">menu</string>
+ <reference key="source" ref="303258537"/>
+ <reference key="destination" ref="680718563"/>
+ </object>
+ <int key="connectionID">570</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">formatter</string>
+ <reference key="source" ref="353050319"/>
+ <reference key="destination" ref="753481486"/>
+ </object>
+ <int key="connectionID">534</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">_dbWindowController</string>
+ <reference key="source" ref="471964374"/>
<reference key="destination" ref="1001"/>
</object>
- <int key="connectionID">219</int>
+ <int key="connectionID">506</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">_propertyTable</string>
+ <reference key="source" ref="471964374"/>
+ <reference key="destination" ref="303258537"/>
+ </object>
+ <int key="connectionID">507</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">_addPropertyButton</string>
+ <reference key="source" ref="471964374"/>
+ <reference key="destination" ref="791694264"/>
+ </object>
+ <int key="connectionID">509</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">_removePropertyButton</string>
+ <reference key="source" ref="471964374"/>
+ <reference key="destination" ref="575264688"/>
+ </object>
+ <int key="connectionID">510</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">addProperty:</string>
+ <reference key="source" ref="471964374"/>
+ <reference key="destination" ref="791694264"/>
+ </object>
+ <int key="connectionID">513</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">removeProperty:</string>
+ <reference key="source" ref="471964374"/>
+ <reference key="destination" ref="575264688"/>
+ </object>
+ <int key="connectionID">514</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">_saveButton</string>
+ <reference key="source" ref="471964374"/>
+ <reference key="destination" ref="572768367"/>
+ </object>
+ <int key="connectionID">526</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">_revertButton</string>
+ <reference key="source" ref="471964374"/>
+ <reference key="destination" ref="880618563"/>
+ </object>
+ <int key="connectionID">527</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">saveDocument:</string>
+ <reference key="source" ref="471964374"/>
+ <reference key="destination" ref="572768367"/>
+ </object>
+ <int key="connectionID">530</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">revertDocumentToSaved:</string>
+ <reference key="source" ref="471964374"/>
+ <reference key="destination" ref="880618563"/>
+ </object>
+ <int key="connectionID">531</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">_table</string>
+ <reference key="source" ref="471964374"/>
+ <reference key="destination" ref="303258537"/>
+ </object>
+ <int key="connectionID">535</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">addColumnForSelectedProperty:</string>
+ <reference key="source" ref="471964374"/>
+ <reference key="destination" ref="266857441"/>
+ </object>
+ <int key="connectionID">571</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">removeProperty:</string>
+ <reference key="source" ref="471964374"/>
+ <reference key="destination" ref="909997835"/>
+ </object>
+ <int key="connectionID">572</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -648,39 +1037,41 @@
<reference key="object" ref="1006"/>
<array class="NSMutableArray" key="children">
<reference ref="967525427"/>
- <reference ref="452264918"/>
- <object class="IBNSLayoutConstraint" id="384791151">
- <reference key="firstItem" ref="1006"/>
- <int key="firstAttribute">4</int>
+ <object class="IBNSLayoutConstraint" id="391241492">
+ <reference key="firstItem" ref="967525427"/>
+ <int key="firstAttribute">3</int>
<int key="relation">0</int>
- <reference key="secondItem" ref="452264918"/>
- <int key="secondAttribute">4</int>
+ <reference key="secondItem" ref="1006"/>
+ <int key="secondAttribute">3</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
- <double key="value">3</double>
+ <double key="value">-1</double>
</object>
<float key="priority">1000</float>
- <int key="scoringType">9</int>
- <float key="scoringTypeFloat">40</float>
+ <int key="scoringType">3</int>
+ <float key="scoringTypeFloat">9</float>
<int key="contentType">3</int>
<reference key="containingView" ref="1006"/>
</object>
- <object class="IBNSLayoutConstraint" id="391241492">
+ <object class="IBNSLayoutConstraint" id="85652946">
<reference key="firstItem" ref="967525427"/>
- <int key="firstAttribute">3</int>
+ <int key="firstAttribute">10</int>
<int key="relation">0</int>
<reference key="secondItem" ref="1006"/>
- <int key="secondAttribute">3</int>
+ <int key="secondAttribute">10</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
- <double key="value">-1</double>
+ <double key="value">-11</double>
</object>
<float key="priority">1000</float>
- <int key="scoringType">3</int>
- <float key="scoringTypeFloat">9</float>
- <int key="contentType">3</int>
+ <int key="scoringType">5</int>
+ <float key="scoringTypeFloat">22</float>
+ <int key="contentType">2</int>
<reference key="containingView" ref="1006"/>
</object>
+ <reference ref="575264688"/>
+ <reference ref="159169962"/>
+ <reference ref="818211244"/>
<object class="IBNSLayoutConstraint" id="17296544">
<reference key="firstItem" ref="967525427"/>
<int key="firstAttribute">6</int>
@@ -697,15 +1088,15 @@
<int key="contentType">3</int>
<reference key="containingView" ref="1006"/>
</object>
- <object class="IBNSLayoutConstraint" id="221610906">
- <reference key="firstItem" ref="1006"/>
- <int key="firstAttribute">4</int>
+ <object class="IBNSLayoutConstraint" id="361097245">
+ <reference key="firstItem" ref="818211244"/>
+ <int key="firstAttribute">5</int>
<int key="relation">0</int>
- <reference key="secondItem" ref="967525427"/>
- <int key="secondAttribute">4</int>
+ <reference key="secondItem" ref="1006"/>
+ <int key="secondAttribute">5</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
- <double key="value">21</double>
+ <double key="value">32</double>
</object>
<float key="priority">1000</float>
<int key="scoringType">3</int>
@@ -713,15 +1104,16 @@
<int key="contentType">3</int>
<reference key="containingView" ref="1006"/>
</object>
- <object class="IBNSLayoutConstraint" id="93805967">
- <reference key="firstItem" ref="452264918"/>
- <int key="firstAttribute">5</int>
+ <reference ref="572768367"/>
+ <object class="IBNSLayoutConstraint" id="328272877">
+ <reference key="firstItem" ref="1006"/>
+ <int key="firstAttribute">6</int>
<int key="relation">0</int>
- <reference key="secondItem" ref="1006"/>
- <int key="secondAttribute">5</int>
+ <reference key="secondItem" ref="572768367"/>
+ <int key="secondAttribute">6</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
- <double key="value">6</double>
+ <double key="value">15</double>
</object>
<float key="priority">1000</float>
<int key="scoringType">3</int>
@@ -729,22 +1121,184 @@
<int key="contentType">3</int>
<reference key="containingView" ref="1006"/>
</object>
- <object class="IBNSLayoutConstraint" id="111645138">
- <reference key="firstItem" ref="967525427"/>
- <int key="firstAttribute">5</int>
+ <reference ref="880618563"/>
+ <object class="IBNSLayoutConstraint" id="134871437">
+ <reference key="firstItem" ref="880618563"/>
+ <int key="firstAttribute">11</int>
<int key="relation">0</int>
- <reference key="secondItem" ref="1006"/>
- <int key="secondAttribute">5</int>
+ <reference key="secondItem" ref="572768367"/>
+ <int key="secondAttribute">11</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">0.0</double>
</object>
<float key="priority">1000</float>
- <int key="scoringType">8</int>
+ <int key="scoringType">6</int>
+ <float key="scoringTypeFloat">24</float>
+ <int key="contentType">2</int>
+ <reference key="containingView" ref="1006"/>
+ </object>
+ <object class="IBNSLayoutConstraint" id="111645138">
+ <reference key="firstItem" ref="967525427"/>
+ <int key="firstAttribute">5</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="1006"/>
+ <int key="secondAttribute">5</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">0.0</double>
+ </object>
+ <float key="priority">1000</float>
+ <int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
<reference key="containingView" ref="1006"/>
</object>
+ <reference ref="791694264"/>
+ <object class="IBNSLayoutConstraint" id="353305455">
+ <reference key="firstItem" ref="1006"/>
+ <int key="firstAttribute">6</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="791694264"/>
+ <int key="secondAttribute">6</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">206</double>
+ </object>
+ <float key="priority">1</float>
+ <int key="scoringType">9</int>
+ <float key="scoringTypeFloat">40</float>
+ <int key="contentType">3</int>
+ <reference key="containingView" ref="1006"/>
+ </object>
+ <object class="IBNSLayoutConstraint" id="449278462">
+ <reference key="firstItem" ref="791694264"/>
+ <int key="firstAttribute">11</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="575264688"/>
+ <int key="secondAttribute">11</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">0.0</double>
+ </object>
+ <float key="priority">1000</float>
+ <int key="scoringType">6</int>
+ <float key="scoringTypeFloat">24</float>
+ <int key="contentType">2</int>
+ <reference key="containingView" ref="1006"/>
+ </object>
+ <object class="IBNSLayoutConstraint" id="92454670">
+ <reference key="firstItem" ref="575264688"/>
+ <int key="firstAttribute">5</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="791694264"/>
+ <int key="secondAttribute">6</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">2</double>
+ </object>
+ <float key="priority">1000</float>
+ <int key="scoringType">9</int>
+ <float key="scoringTypeFloat">40</float>
+ <int key="contentType">3</int>
+ <reference key="containingView" ref="1006"/>
+ </object>
+ <object class="IBNSLayoutConstraint" id="142437275">
+ <reference key="firstItem" ref="159169962"/>
+ <int key="firstAttribute">11</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="818211244"/>
+ <int key="secondAttribute">11</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">0.0</double>
+ </object>
+ <float key="priority">1000</float>
+ <int key="scoringType">6</int>
+ <float key="scoringTypeFloat">24</float>
+ <int key="contentType">2</int>
+ <reference key="containingView" ref="1006"/>
+ </object>
+ <object class="IBNSLayoutConstraint" id="747963537">
+ <reference key="firstItem" ref="1006"/>
+ <int key="firstAttribute">4</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="159169962"/>
+ <int key="secondAttribute">4</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">1</double>
+ </object>
+ <float key="priority">1000</float>
+ <int key="scoringType">3</int>
+ <float key="scoringTypeFloat">9</float>
+ <int key="contentType">3</int>
+ <reference key="containingView" ref="1006"/>
+ </object>
+ <object class="IBNSLayoutConstraint" id="467798700">
+ <reference key="firstItem" ref="572768367"/>
+ <int key="firstAttribute">5</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="880618563"/>
+ <int key="secondAttribute">6</int>
+ <float key="multiplier">1</float>
+ <object class="IBNSLayoutSymbolicConstant" key="constant">
+ <double key="value">8</double>
+ </object>
+ <float key="priority">1000</float>
+ <int key="scoringType">6</int>
+ <float key="scoringTypeFloat">24</float>
+ <int key="contentType">3</int>
+ <reference key="containingView" ref="1006"/>
+ </object>
+ <object class="IBNSLayoutConstraint" id="94717460">
+ <reference key="firstItem" ref="791694264"/>
+ <int key="firstAttribute">11</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="818211244"/>
+ <int key="secondAttribute">11</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">0.0</double>
+ </object>
+ <float key="priority">1000</float>
+ <int key="scoringType">6</int>
+ <float key="scoringTypeFloat">24</float>
+ <int key="contentType">2</int>
+ <reference key="containingView" ref="1006"/>
+ </object>
+ <object class="IBNSLayoutConstraint" id="312989075">
+ <reference key="firstItem" ref="575264688"/>
+ <int key="firstAttribute">10</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="880618563"/>
+ <int key="secondAttribute">10</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">0.0</double>
+ </object>
+ <float key="priority">1000</float>
+ <int key="scoringType">6</int>
+ <float key="scoringTypeFloat">24</float>
+ <int key="contentType">2</int>
+ <reference key="containingView" ref="1006"/>
+ </object>
+ <object class="IBNSLayoutConstraint" id="795487146">
+ <reference key="firstItem" ref="159169962"/>
+ <int key="firstAttribute">5</int>
+ <int key="relation">0</int>
+ <reference key="secondItem" ref="1006"/>
+ <int key="secondAttribute">5</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">8</double>
+ </object>
+ <float key="priority">1000</float>
+ <int key="scoringType">3</int>
+ <float key="scoringTypeFloat">9</float>
+ <int key="contentType">3</int>
+ <reference key="containingView" ref="1006"/>
+ </object>
</array>
<reference key="parent" ref="1005"/>
</object>
@@ -851,6 +1405,7 @@
<reference ref="85036781"/>
<reference ref="529177016"/>
<reference ref="876443600"/>
+ <reference ref="669953691"/>
</array>
<reference key="parent" ref="42718253"/>
</object>
@@ -894,69 +1449,289 @@
<reference key="parent" ref="85036781"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">323</int>
- <reference key="object" ref="452264918"/>
+ <int key="objectID">374</int>
+ <reference key="object" ref="669953691"/>
<array class="NSMutableArray" key="children">
- <reference ref="254871633"/>
- <object class="IBNSLayoutConstraint" id="114053163">
- <reference key="firstItem" ref="452264918"/>
+ <reference ref="530224180"/>
+ </array>
+ <reference key="parent" ref="417721070"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">375</int>
+ <reference key="object" ref="530224180"/>
+ <reference key="parent" ref="669953691"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">376</int>
+ <reference key="object" ref="791694264"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="1072978031"/>
+ <object class="IBNSLayoutConstraint" id="749103262">
+ <reference key="firstItem" ref="791694264"/>
<int key="firstAttribute">7</int>
<int key="relation">0</int>
<nil key="secondItem"/>
<int key="secondAttribute">0</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
- <double key="value">328</double>
+ <double key="value">21</double>
</object>
<float key="priority">1000</float>
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
- <reference key="containingView" ref="452264918"/>
+ <reference key="containingView" ref="791694264"/>
</object>
</array>
<reference key="parent" ref="1006"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">324</int>
- <reference key="object" ref="254871633"/>
- <reference key="parent" ref="452264918"/>
+ <int key="objectID">377</int>
+ <reference key="object" ref="1072978031"/>
+ <reference key="parent" ref="791694264"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">347</int>
- <reference key="object" ref="384791151"/>
+ <int key="objectID">407</int>
+ <reference key="object" ref="575264688"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="588214969"/>
+ <object class="IBNSLayoutConstraint" id="547454484">
+ <reference key="firstItem" ref="575264688"/>
+ <int key="firstAttribute">7</int>
+ <int key="relation">0</int>
+ <nil key="secondItem"/>
+ <int key="secondAttribute">0</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">21</double>
+ </object>
+ <float key="priority">1000</float>
+ <int key="scoringType">3</int>
+ <float key="scoringTypeFloat">9</float>
+ <int key="contentType">1</int>
+ <reference key="containingView" ref="575264688"/>
+ </object>
+ </array>
<reference key="parent" ref="1006"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">358</int>
- <reference key="object" ref="391241492"/>
+ <int key="objectID">409</int>
+ <reference key="object" ref="588214969"/>
+ <reference key="parent" ref="575264688"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">475</int>
+ <reference key="object" ref="159169962"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="985993223"/>
+ <object class="IBNSLayoutConstraint" id="956740129">
+ <reference key="firstItem" ref="159169962"/>
+ <int key="firstAttribute">7</int>
+ <int key="relation">0</int>
+ <nil key="secondItem"/>
+ <int key="secondAttribute">0</int>
+ <float key="multiplier">1</float>
+ <object class="IBLayoutConstant" key="constant">
+ <double key="value">21</double>
+ </object>
+ <float key="priority">1000</float>
+ <int key="scoringType">3</int>
+ <float key="scoringTypeFloat">9</float>
+ <int key="contentType">1</int>
+ <reference key="containingView" ref="159169962"/>
+ </object>
+ </array>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">476</int>
+ <reference key="object" ref="818211244"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref=