Permalink
Browse files

New look. Proper isMainWindow handling. Sorting properly sets documen…

…tEdited - to implement this for value changes, implement NSUndoManager.
  • Loading branch information...
1 parent d86a1bd commit 947bb67a2ee26c181ceb02dbbf833531f6146c10 svnuser committed Oct 22, 2009
View
@@ -21,6 +21,7 @@
}
+ (CSVInspector *) sharedInspector;
++ (void) show:(id)sender;
- (IBAction) performCalculation:(id)sender;
- (void) updateCalculationStatus:(NSNumber *)alreadyDone;
View
@@ -88,12 +88,28 @@ - (void) dealloc // will never be called anyway! (Singleton)
#pragma mark GUI
++ (void) show:(id)sender
+{
+ CSVInspector *i = [CSVInspector sharedInspector];
+
+ while (nil == [i window]) {
+ usleep(50);
+ }
+
+ [[i window] makeKeyAndOrderFront:sender];
+}
+
- (void) awakeFromNib
{
// DEBUGGING
[calculationSourceRegExp setStringValue:@"(\\d+)\\.(\\d+)"];
[calculationTargetExpr setStringValue:@"$1 * $2"];
}
+
+- (NSString *) windowFrameAutosaveName
+{
+ return @"CSVInspectorMainWindow";
+}
#pragma mark -
@@ -141,7 +157,6 @@ - (void) updateCalculationStatus:(NSNumber *)alreadyDone
calculationIsRunning = NO;
}
}
-#pragma mark -
@end

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -272,23 +272,22 @@
<string>EE9E14C21043DA5D00554687</string>
<string>EE64B59F1049D9C5000DF5D2</string>
<string>EE1512230D7F04910092C02F</string>
+ <string>EE137AB21090565D00D31816</string>
+ <string>EE137AB31090566500D31816</string>
<string>2A37F4B8FDCFA73011CA2CEA</string>
<string>2A37F4C3FDCFA73011CA2CEA</string>
- <string>1C37FBAC04509CD000000102</string>
- <string>EE13770A108876B900D31816</string>
- <string>EE13770B108876B900D31816</string>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
- <integer>33</integer>
- <integer>30</integer>
+ <integer>17</integer>
+ <integer>12</integer>
<integer>1</integer>
<integer>0</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
- <string>{{0, 234}, {257, 867}}</string>
+ <string>{{0, 0}, {257, 867}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
@@ -307,7 +306,7 @@
<real>235</real>
</array>
<key>RubberWindowFrame</key>
- <string>121 102 1430 926 0 0 1680 1028 </string>
+ <string>201 102 1430 926 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@@ -325,19 +324,19 @@
<key>PBXProjectModuleGUID</key>
<string>EEF027910D6D8015000532A4</string>
<key>PBXProjectModuleLabel</key>
- <string>DataTableView.m</string>
+ <string>CSVRow.m</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>EEF027920D6D8015000532A4</string>
<key>PBXProjectModuleLabel</key>
- <string>DataTableView.m</string>
+ <string>CSVRow.m</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>EE137A8E108F776700D31816</string>
+ <string>EE137BD41090861A00D31816</string>
<key>history</key>
<array>
<string>EECAA3C10D803E5200AE2D4A</string>
@@ -349,49 +348,51 @@
<string>EE9E11301042D26300554687</string>
<string>EE9E24081048283F00554687</string>
<string>EE9E241410482B3300554687</string>
- <string>EE64B6D8104A8803000DF5D2</string>
<string>EE64B712104AADA2000DF5D2</string>
<string>EE64B713104AADA2000DF5D2</string>
<string>EE64B714104AADA2000DF5D2</string>
<string>EE64B715104AADA2000DF5D2</string>
<string>EE64B88A104AB914000DF5D2</string>
<string>EE64B8F1104AC0BF000DF5D2</string>
- <string>EECDB98B104AC66700260BC7</string>
- <string>EECDB98C104AC66700260BC7</string>
- <string>EE219E59107F71C000E28D4D</string>
<string>EEF0713F108608EF00C05DE9</string>
<string>EEF0715410860BCE00C05DE9</string>
<string>EEF071D51086164200C05DE9</string>
- <string>EEF071F6108618B000C05DE9</string>
<string>EEF0720E10861CB100C05DE9</string>
<string>EEF0724B1086225A00C05DE9</string>
- <string>EEF0724C1086225A00C05DE9</string>
- <string>EEF072A110862AAB00C05DE9</string>
<string>EEF072F4108630B900C05DE9</string>
<string>EEF07453108781AD00C05DE9</string>
<string>EE13773B1088A0B700D31816</string>
<string>EE13773C1088A0B700D31816</string>
<string>EE13778E1088A95400D31816</string>
- <string>EE1378941088B9D100D31816</string>
<string>EE1378DE1088BCD400D31816</string>
<string>EE1379211088C19900D31816</string>
<string>EE1379401088C32E00D31816</string>
- <string>EE1379411088C32E00D31816</string>
<string>EE13795A1088C3F300D31816</string>
<string>EE13795B1088C3F300D31816</string>
<string>EE13797B1088C4F700D31816</string>
<string>EE1379851088C5EB00D31816</string>
- <string>EE1379861088C5EB00D31816</string>
- <string>EE1379BD108E096800D31816</string>
<string>EE1379C4108E0E6000D31816</string>
- <string>EE1379E6108F07B200D31816</string>
<string>EE1379E7108F07B200D31816</string>
- <string>EE1379EB108F0A8100D31816</string>
- <string>EE137A52108F16AB00D31816</string>
- <string>EE137A70108F74D200D31816</string>
- <string>EE137A7C108F752B00D31816</string>
- <string>EE137A8C108F776700D31816</string>
- <string>EE137A8D108F776700D31816</string>
+ <string>EE137A9D10904B7A00D31816</string>
+ <string>EE137ACA10905AA200D31816</string>
+ <string>EE137ACB10905AA200D31816</string>
+ <string>EE137ACC10905AA200D31816</string>
+ <string>EE137AE5109061F700D31816</string>
+ <string>EE137AE6109061F700D31816</string>
+ <string>EE137AE7109061F700D31816</string>
+ <string>EE137AE8109061F700D31816</string>
+ <string>EE137AF7109062E000D31816</string>
+ <string>EE137B11109065AF00D31816</string>
+ <string>EE137B5010907AA000D31816</string>
+ <string>EE137B5310907AA000D31816</string>
+ <string>EE137B8B10907FA000D31816</string>
+ <string>EE137B8C10907FA000D31816</string>
+ <string>EE137B9910907FDF00D31816</string>
+ <string>EE137BA31090812C00D31816</string>
+ <string>EE137BC91090842800D31816</string>
+ <string>EE137BCA1090842800D31816</string>
+ <string>EE137BCB1090842800D31816</string>
+ <string>EE137BD31090843B00D31816</string>
</array>
</dict>
<key>SplitCount</key>
@@ -407,7 +408,7 @@
<key>Frame</key>
<string>{{0, 0}, {1151, 880}}</string>
<key>RubberWindowFrame</key>
- <string>121 102 1430 926 0 0 1680 1028 </string>
+ <string>201 102 1430 926 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
@@ -507,7 +508,7 @@
<key>Frame</key>
<string>{{10, 27}, {1151, -27}}</string>
<key>RubberWindowFrame</key>
- <string>121 102 1430 926 0 0 1680 1028 </string>
+ <string>201 102 1430 926 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
@@ -733,7 +734,7 @@
<string>/Users/pp/Cocoa/CSVManipulator/CSVManipulator.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>121 102 1430 926 0 0 1680 1028 </string>
+ <string>201 102 1430 926 0 0 1680 1028 </string>
<key>WindowToolsV3</key>
<array>
<dict>
@@ -27,6 +27,11 @@
8D15AC320486D014006FF6A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; };
EE0D3A2A0D6F02350009A7B2 /* DataTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = EE0D3A290D6F02350009A7B2 /* DataTableView.m */; };
+ EE137ABC1090568600D31816 /* TB_add_column.tiff in Resources */ = {isa = PBXBuildFile; fileRef = EE137AB71090568600D31816 /* TB_add_column.tiff */; };
+ EE137ABD1090568600D31816 /* TB_inspector.tiff in Resources */ = {isa = PBXBuildFile; fileRef = EE137AB81090568600D31816 /* TB_inspector.tiff */; };
+ EE137ABE1090568600D31816 /* TB_remove_column.tiff in Resources */ = {isa = PBXBuildFile; fileRef = EE137AB91090568600D31816 /* TB_remove_column.tiff */; };
+ EE137ABF1090568600D31816 /* TB_remove_row.tiff in Resources */ = {isa = PBXBuildFile; fileRef = EE137ABA1090568600D31816 /* TB_remove_row.tiff */; };
+ EE137AC01090568600D31816 /* TB_add_row.tiff in Resources */ = {isa = PBXBuildFile; fileRef = EE137ABB1090568600D31816 /* TB_add_row.tiff */; };
EE1512200D7F048D0092C02F /* DataTableColumn.m in Sources */ = {isa = PBXBuildFile; fileRef = EE15121D0D7F048D0092C02F /* DataTableColumn.m */; };
EE1512210D7F048D0092C02F /* DataTableHeaderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = EE15121F0D7F048D0092C02F /* DataTableHeaderCell.m */; };
EE219ED5107F849100E28D4D /* DataTableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = EE219ED4107F849100E28D4D /* DataTableCell.m */; };
@@ -81,6 +86,11 @@
EE0D3A280D6F02350009A7B2 /* DataTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataTableView.h; sourceTree = "<group>"; };
EE0D3A290D6F02350009A7B2 /* DataTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DataTableView.m; sourceTree = "<group>"; };
EE1377641088A54D00D31816 /* DataTableViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataTableViewDelegate.h; sourceTree = "<group>"; };
+ EE137AB71090568600D31816 /* TB_add_column.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = TB_add_column.tiff; sourceTree = "<group>"; };
+ EE137AB81090568600D31816 /* TB_inspector.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = TB_inspector.tiff; sourceTree = "<group>"; };
+ EE137AB91090568600D31816 /* TB_remove_column.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = TB_remove_column.tiff; sourceTree = "<group>"; };
+ EE137ABA1090568600D31816 /* TB_remove_row.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = TB_remove_row.tiff; sourceTree = "<group>"; };
+ EE137ABB1090568600D31816 /* TB_add_row.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = TB_add_row.tiff; sourceTree = "<group>"; };
EE15121C0D7F048D0092C02F /* DataTableColumn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataTableColumn.h; sourceTree = "<group>"; };
EE15121D0D7F048D0092C02F /* DataTableColumn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DataTableColumn.m; sourceTree = "<group>"; };
EE15121E0D7F048D0092C02F /* DataTableHeaderCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataTableHeaderCell.h; sourceTree = "<group>"; };
@@ -174,6 +184,7 @@
isa = PBXGroup;
children = (
2A37F4ABFDCFA73011CA2CEA /* Classes */,
+ EE137AB21090565D00D31816 /* Images */,
2A37F4B8FDCFA73011CA2CEA /* Resources */,
2A37F4C3FDCFA73011CA2CEA /* Frameworks */,
19C28FB0FE9D524F11CA2CBB /* Products */,
@@ -242,6 +253,27 @@
name = Frameworks;
sourceTree = "<group>";
};
+ EE137AB21090565D00D31816 /* Images */ = {
+ isa = PBXGroup;
+ children = (
+ EE137AB31090566500D31816 /* Toolbar */,
+ );
+ name = Images;
+ sourceTree = "<group>";
+ };
+ EE137AB31090566500D31816 /* Toolbar */ = {
+ isa = PBXGroup;
+ children = (
+ EE137AB71090568600D31816 /* TB_add_column.tiff */,
+ EE137AB81090568600D31816 /* TB_inspector.tiff */,
+ EE137AB91090568600D31816 /* TB_remove_column.tiff */,
+ EE137ABA1090568600D31816 /* TB_remove_row.tiff */,
+ EE137ABB1090568600D31816 /* TB_add_row.tiff */,
+ );
+ name = Toolbar;
+ path = Images/Toolbar;
+ sourceTree = "<group>";
+ };
EE1512230D7F04910092C02F /* DataTable */ = {
isa = PBXGroup;
children = (
@@ -354,6 +386,11 @@
EE9E1DEE1046BDC400554687 /* MyDocument.xib in Resources */,
EE9E1DF41046BE3900554687 /* MainMenu.xib in Resources */,
EE64B6AE104A8598000DF5D2 /* CSVInspector.xib in Resources */,
+ EE137ABC1090568600D31816 /* TB_add_column.tiff in Resources */,
+ EE137ABD1090568600D31816 /* TB_inspector.tiff in Resources */,
+ EE137ABE1090568600D31816 /* TB_remove_column.tiff in Resources */,
+ EE137ABF1090568600D31816 /* TB_remove_row.tiff in Resources */,
+ EE137AC01090568600D31816 /* TB_add_row.tiff in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
@@ -7,6 +7,7 @@
//
#import <Cocoa/Cocoa.h>
+#import <AppKit/AppKit.h>
#import "DataTableViewDelegate.h"
@class MyDocument;
@class PPStringFormat;
@@ -27,29 +28,27 @@
IBOutlet NSPopUpButton *copyAsKindPopup;
- // Export sheet
- IBOutlet NSView *exportAccessoryView;
-
// Progress window
IBOutlet NSPanel *progressSheet;
IBOutlet NSProgressIndicator *progressIndicator;
IBOutlet NSTextField *progressPercentage;
+
+ // Export sheet
+ IBOutlet NSPanel *exportSheet;
}
@property (nonatomic, assign) MyDocument *document;
@property (nonatomic, retain) IBOutlet DataTableView *mainTable;
@property (nonatomic, retain) IBOutlet PPToolbarView *mainToolbar;
-@property (nonatomic, retain) IBOutlet NSView *exportAccessoryView;
+@property (nonatomic, retain) IBOutlet NSPanel *progressSheet;
+@property (nonatomic, retain) IBOutlet NSPanel *exportSheet;
-// Export Sheet
-- (IBAction) exportDocument:(id)sender;
-
// Data control
-- (void) addToCSVRow:(id)sender;
-- (void) removeFromCSVRow:(id)sender;
+- (IBAction) addCSVRow:(id)sender;
+- (IBAction) removeCSVRow:(id)sender;
// Display options
- (IBAction) restoreOriginalOrder:(id)sender;
@@ -59,13 +58,21 @@
- (void) redefineTable;
- (void) refreshData;
+// Inspector
+- (IBAction) showInspector:(id)sender;
+
// Progress Sheet Actions
- (void) showProgressSheet;
- (void) updateProgressSheetProgress:(CGFloat)percentage;
- (void) hideProgressSheet;
- (IBAction) abortImport:(id)sender;
- (void) didAbortImport:(BOOL)flag;
+// Export Sheet
+- (IBAction) showExportSheet:(id)sender;
+- (IBAction) exportDocument:(id)sender;
+- (IBAction) hideExportSheet:(id)sender;
+
@end
Oops, something went wrong.

0 comments on commit 947bb67

Please sign in to comment.