Permalink
Browse files

Header checkbox reimplementation finished. Rearranging rows works aga…

…in. Lots of beautifulazations. Next: Export.
  • Loading branch information...
svnuser
svnuser committed Oct 16, 2009
1 parent 78bef07 commit f813a9e33a18e9fecba352a058c99fa9e40321e9
@@ -72,7 +72,7 @@
- (BOOL) parseCSVString:(NSString *)string error:(NSError **)error;
- (BOOL) parseCSVString:(NSString *)string maxRows:(NSUInteger)maxRows error:(NSError **)error;
#ifdef CSV_STRING_EXPORTING
-- (NSString *) stringInFormat:(PPStringFormat *)format withColumns:(NSArray *)columnArray forRowIndexes:(NSIndexSet *)rowIndexes writeHeader:(BOOL)headerFlag;
+- (NSString *) stringInFormat:(PPStringFormat *)format withColumns:(NSArray *)columnArray forRowIndexes:(NSIndexSet *)rowIndexes includeHeaders:(BOOL)headerFlag;
#endif
// column handling
@@ -344,7 +344,7 @@ - (BOOL) parseCSVString:(NSString *)string maxRows:(NSUInteger)maxRows error:(NS
#pragma mark Returning as String
#ifdef CSV_STRING_EXPORTING
-- (NSString *) stringInFormat:(PPStringFormat *)format withColumns:(NSArray *)columnArray forRowIndexes:(NSIndexSet *)rowIndexes writeHeader:(BOOL)headerFlag
+- (NSString *) stringInFormat:(PPStringFormat *)format withColumns:(NSArray *)columnArray forRowIndexes:(NSIndexSet *)rowIndexes includeHeaders:(BOOL)headerFlag
{
if ([columnArray count] < 1) {
return @"";
@@ -361,6 +361,7 @@ - (NSString *) stringInFormat:(PPStringFormat *)format withColumns:(NSArray *)co
}
// get desired row indexes if not given
+ // TODO: Also return header rows if we want the headers!
if (nil == rowIndexes) {
if (NSNotFound == [rowController selectionIndex]) {
NSRange fullRange = NSMakeRange(0, [rows count]);
@@ -373,7 +374,9 @@ - (NSString *) stringInFormat:(PPStringFormat *)format withColumns:(NSArray *)co
NSArray *exportRows = [[rowController arrangedObjects] objectsAtIndexes:rowIndexes];
// get the string from the formatter
- return [format stringForRows:exportRows includeHeaderRows:headerFlag withColumnKeys:columnKeys];
+ NSString *string = [format stringForRows:exportRows includeHeaderRows:headerFlag withColumnKeys:columnKeys];
+ NSLog(@"--> %@ returning formatted string:\n%@", self, string);
+ return string;
}
#endif
#pragma mark -

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -234,8 +234,6 @@
<key>Layout</key>
<array>
<dict>
- <key>BecomeActive</key>
- <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
@@ -277,12 +275,15 @@
<string>2A37F4B8FDCFA73011CA2CEA</string>
<string>2A37F4C3FDCFA73011CA2CEA</string>
<string>1C37FBAC04509CD000000102</string>
+ <string>EE13770A108876B900D31816</string>
+ <string>EE13770B108876B900D31816</string>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
- <integer>48</integer>
- <integer>42</integer>
+ <integer>15</integer>
+ <integer>12</integer>
+ <integer>1</integer>
<integer>0</integer>
</array>
</array>
@@ -306,7 +307,7 @@
<real>235</real>
</array>
<key>RubberWindowFrame</key>
- <string>118 102 1430 926 0 0 1680 1028 </string>
+ <string>121 102 1430 926 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@@ -317,24 +318,26 @@
<key>Dock</key>
<array>
<dict>
+ <key>BecomeActive</key>
+ <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>EEF027910D6D8015000532A4</string>
<key>PBXProjectModuleLabel</key>
- <string>Info.plist</string>
+ <string>CSVDocument.m</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>EEF027920D6D8015000532A4</string>
<key>PBXProjectModuleLabel</key>
- <string>Info.plist</string>
+ <string>CSVDocument.m</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>EEF074AF1087880600C05DE9</string>
+ <string>EE1379881088C5EB00D31816</string>
<key>history</key>
<array>
<string>EECAA3C10D803E5200AE2D4A</string>
@@ -346,7 +349,6 @@
<string>EE9E11301042D26300554687</string>
<string>EE9E24081048283F00554687</string>
<string>EE9E241410482B3300554687</string>
- <string>EE64B60C1049E8A1000DF5D2</string>
<string>EE64B6D8104A8803000DF5D2</string>
<string>EE64B712104AADA2000DF5D2</string>
<string>EE64B713104AADA2000DF5D2</string>
@@ -356,38 +358,40 @@
<string>EE64B8F1104AC0BF000DF5D2</string>
<string>EECDB98B104AC66700260BC7</string>
<string>EECDB98C104AC66700260BC7</string>
- <string>EECDBB8D104DA80900260BC7</string>
<string>EE219E59107F71C000E28D4D</string>
<string>EEF0713F108608EF00C05DE9</string>
<string>EEF0715410860BCE00C05DE9</string>
- <string>EEF0715510860BCE00C05DE9</string>
- <string>EEF071691086102700C05DE9</string>
- <string>EEF0716A1086102700C05DE9</string>
<string>EEF071D51086164200C05DE9</string>
<string>EEF071F5108618B000C05DE9</string>
<string>EEF071F6108618B000C05DE9</string>
- <string>EEF0720B10861CB100C05DE9</string>
- <string>EEF0720D10861CB100C05DE9</string>
<string>EEF0720E10861CB100C05DE9</string>
- <string>EEF0720F10861CB100C05DE9</string>
<string>EEF0724B1086225A00C05DE9</string>
<string>EEF0724C1086225A00C05DE9</string>
- <string>EEF0724D1086225A00C05DE9</string>
<string>EEF072851086275100C05DE9</string>
- <string>EEF072A010862AAB00C05DE9</string>
<string>EEF072A110862AAB00C05DE9</string>
- <string>EEF072AD10862B2900C05DE9</string>
<string>EEF072BF10862B8A00C05DE9</string>
<string>EEF072F4108630B900C05DE9</string>
- <string>EEF07359108634CE00C05DE9</string>
- <string>EEF073621086351600C05DE9</string>
- <string>EEF0737B1086376200C05DE9</string>
- <string>EEF073831086383400C05DE9</string>
<string>EEF07453108781AD00C05DE9</string>
- <string>EEF074771087855700C05DE9</string>
- <string>EEF07488108785EC00C05DE9</string>
- <string>EEF074AD1087880600C05DE9</string>
- <string>EEF074AE1087880600C05DE9</string>
+ <string>EE13773B1088A0B700D31816</string>
+ <string>EE13773C1088A0B700D31816</string>
+ <string>EE13778E1088A95400D31816</string>
+ <string>EE1377901088A95400D31816</string>
+ <string>EE1377911088A95400D31816</string>
+ <string>EE1378901088B9D100D31816</string>
+ <string>EE1378911088B9D100D31816</string>
+ <string>EE1378941088B9D100D31816</string>
+ <string>EE1378DE1088BCD400D31816</string>
+ <string>EE1379211088C19900D31816</string>
+ <string>EE1379401088C32E00D31816</string>
+ <string>EE1379411088C32E00D31816</string>
+ <string>EE13795A1088C3F300D31816</string>
+ <string>EE13795B1088C3F300D31816</string>
+ <string>EE1379781088C4F700D31816</string>
+ <string>EE13797A1088C4F700D31816</string>
+ <string>EE13797B1088C4F700D31816</string>
+ <string>EE1379851088C5EB00D31816</string>
+ <string>EE1379861088C5EB00D31816</string>
+ <string>EE1379871088C5EB00D31816</string>
</array>
</dict>
<key>SplitCount</key>
@@ -403,7 +407,7 @@
<key>Frame</key>
<string>{{0, 0}, {1151, 880}}</string>
<key>RubberWindowFrame</key>
- <string>118 102 1430 926 0 0 1680 1028 </string>
+ <string>121 102 1430 926 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
@@ -442,7 +446,9 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {614, 336}}</string>
+ <string>{{10, 27}, {1151, -27}}</string>
+ <key>RubberWindowFrame</key>
+ <string>121 102 1430 926 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
@@ -502,8 +508,6 @@
<dict>
<key>Frame</key>
<string>{{10, 27}, {1151, -27}}</string>
- <key>RubberWindowFrame</key>
- <string>118 102 1430 926 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
@@ -531,11 +535,11 @@
</array>
<key>TableOfContents</key>
<array>
- <string>EEF073E3108775BC00C05DE9</string>
+ <string>EE1376741088622D00D31816</string>
<string>1CA23ED40692098700951B8B</string>
- <string>EEF073E4108775BC00C05DE9</string>
+ <string>EE1376751088622D00D31816</string>
<string>EEF027910D6D8015000532A4</string>
- <string>EEF073E5108775BC00C05DE9</string>
+ <string>EE1376761088622D00D31816</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
@@ -684,14 +688,14 @@
</array>
<key>TableOfContents</key>
<array>
- <string>EEF073E6108775BC00C05DE9</string>
+ <string>EE1376771088622D00D31816</string>
<string>1CCC7628064C1048000F2A68</string>
<string>1CCC7629064C1048000F2A68</string>
- <string>EEF073E7108775BC00C05DE9</string>
- <string>EEF073E8108775BC00C05DE9</string>
- <string>EEF073E9108775BC00C05DE9</string>
- <string>EEF073EA108775BC00C05DE9</string>
- <string>EEF027910D6D8015000532A4</string>
+ <string>EE1376781088622D00D31816</string>
+ <string>EE1376791088622D00D31816</string>
+ <string>EE13767A1088622D00D31816</string>
+ <string>EE13767B1088622D00D31816</string>
+ <string>EE13767C1088622D00D31816</string>
</array>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
@@ -723,12 +727,13 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
- <string>EEF073EC108775BC00C05DE9</string>
- <string>EEF073ED108775BC00C05DE9</string>
+ <string>EEF071321086083800C05DE9</string>
+ <string>EE13768B1088687A00D31816</string>
+ <string>EE13768C1088687A00D31816</string>
<string>/Users/pp/Cocoa/CSVManipulator/CSVManipulator.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>118 102 1430 926 0 0 1680 1028 </string>
+ <string>121 102 1430 926 0 0 1680 1028 </string>
<key>WindowToolsV3</key>
<array>
<dict>
@@ -1560,7 +1565,7 @@
<key>TableOfContents</key>
<array>
<string>EEF071321086083800C05DE9</string>
- <string>EEF071331086083800C05DE9</string>
+ <string>EE1379891088C5EB00D31816</string>
<string>EEF071311086083800C05DE9</string>
</array>
<key>WindowString</key>
Oops, something went wrong.

0 comments on commit f813a9e

Please sign in to comment.