Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Lots of work on the doc property editor, plus adding/removing docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
snej committed May 5, 2012
1 parent 7ff7e3d commit 286b8b0
Show file tree
Hide file tree
Showing 16 changed files with 1,874 additions and 245 deletions.
8 changes: 8 additions & 0 deletions .gitignore
@@ -0,0 +1,8 @@
.DS_Store
*.pbxuser
*.perspectivev3
*.mode1v3
*.framework
xcuserdata/
build/
DerivedData/
Binary file added AppIcon.icns
Binary file not shown.
38 changes: 37 additions & 1 deletion TouchDB Viewer.xcodeproj/project.pbxproj
Expand Up @@ -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 */; };
Expand All @@ -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; };
Expand All @@ -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 */
Expand Down Expand Up @@ -99,19 +122,24 @@
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>";
};
27A8A77D152A008200363704 /* Supporting Files */ = {
isa = PBXGroup;
children = (
27F87AFB1555E7FC00F0A416 /* AppIcon.icns */,
278B0C71152A6B7C00577747 /* TouchDBDoc.icns */,
27A8A77E152A008200363704 /* TouchDB Viewer-Info.plist */,
27A8A77F152A008200363704 /* InfoPlist.strings */,
Expand All @@ -132,6 +160,7 @@
27A8A76E152A008200363704 /* Sources */,
27A8A76F152A008200363704 /* Frameworks */,
27A8A770152A008200363704 /* Resources */,
273A438E153C935F00AEC9D7 /* Copy Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -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;
};
Expand All @@ -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;
};
Expand Down Expand Up @@ -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;
Expand All @@ -250,6 +283,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
VERSIONING_SYSTEM = "apple-generic";
WARNING_CFLAGS = "-Wall";
};
name = Debug;
Expand All @@ -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;
Expand All @@ -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;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added TouchDB Viewer/AppIcon.icns
Binary file not shown.
1 change: 1 addition & 0 deletions TouchDB Viewer/DBDocument.h
Expand Up @@ -8,6 +8,7 @@

#import <Cocoa/Cocoa.h>

/** NSDocument subclass that manages a TouchDB database file. */
@interface DBDocument : NSDocument

@end
6 changes: 6 additions & 0 deletions TouchDB Viewer/DBDocument.m
Expand Up @@ -45,4 +45,10 @@ - (BOOL)readFromURL:(NSURL *)absoluteURL
}


- (void) close {
[(CouchTouchDBServer*)_db.server close];
[super close];
}


@end
12 changes: 11 additions & 1 deletion TouchDB Viewer/DBWindowController.h
Expand Up @@ -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

0 comments on commit 286b8b0

Please sign in to comment.