Permalink
Browse files

Added blog files

  • Loading branch information...
1 parent 527cc89 commit fbab5c200ade757e7c957087a282d61e1297c153 Jeff LaMarche committed Nov 21, 2011
Showing with 19,866 additions and 0 deletions.
  1. BIN .DS_Store
  2. +377 −0 04 - SuperDB/.svn/entries
  3. +5 −0 04 - SuperDB/.svn/prop-base/name_icon.png.svn-base
  4. +5 −0 04 - SuperDB/.svn/prop-base/secret_icon.png.svn-base
  5. +21 −0 04 - SuperDB/.svn/text-base/HeroValueDisplay.h.svn-base
  6. +30 −0 04 - SuperDB/.svn/text-base/HeroValueDisplay.m.svn-base
  7. +634 −0 04 - SuperDB/.svn/text-base/MainWindow.xib.svn-base
  8. +16 −0 04 - SuperDB/.svn/text-base/NSArray-NestedArrays.h.svn-base
  9. +21 −0 04 - SuperDB/.svn/text-base/NSArray-NestedArrays.m.svn-base
  10. +30 −0 04 - SuperDB/.svn/text-base/SuperDB-Info.plist.svn-base
  11. +15 −0 04 - SuperDB/.svn/text-base/SuperDB_Prefix.pch.svn-base
  12. +17 −0 04 - SuperDB/.svn/text-base/main.m.svn-base
  13. BIN 04 - SuperDB/.svn/text-base/name_icon.png.svn-base
  14. BIN 04 - SuperDB/.svn/text-base/secret_icon.png.svn-base
  15. +538 −0 04 - SuperDB/Classes/.svn/entries
  16. +16 −0 04 - SuperDB/Classes/.svn/text-base/HeroEditController.h.svn-base
  17. +148 −0 04 - SuperDB/Classes/.svn/text-base/HeroEditController.m.svn-base
  18. +24 −0 04 - SuperDB/Classes/.svn/text-base/HeroListViewController.h.svn-base
  19. +326 −0 04 - SuperDB/Classes/.svn/text-base/HeroListViewController.m.svn-base
  20. +526 −0 04 - SuperDB/Classes/.svn/text-base/HeroListViewController.xib.svn-base
  21. +15 −0 04 - SuperDB/Classes/.svn/text-base/ManagedObjectAttributeEditor.h.svn-base
  22. +46 −0 04 - SuperDB/Classes/.svn/text-base/ManagedObjectAttributeEditor.m.svn-base
  23. +11 −0 04 - SuperDB/Classes/.svn/text-base/ManagedObjectDateEditor.h.svn-base
  24. +89 −0 04 - SuperDB/Classes/.svn/text-base/ManagedObjectDateEditor.m.svn-base
  25. +11 −0 04 - SuperDB/Classes/.svn/text-base/ManagedObjectSingleSelectionListEditor.h.svn-base
  26. +75 −0 04 - SuperDB/Classes/.svn/text-base/ManagedObjectSingleSelectionListEditor.m.svn-base
  27. +9 −0 04 - SuperDB/Classes/.svn/text-base/ManagedObjectStringEditor.h.svn-base
  28. +74 −0 04 - SuperDB/Classes/.svn/text-base/ManagedObjectStringEditor.m.svn-base
  29. +30 −0 04 - SuperDB/Classes/.svn/text-base/SuperDBAppDelegate.h.svn-base
  30. +142 −0 04 - SuperDB/Classes/.svn/text-base/SuperDBAppDelegate.m.svn-base
  31. +16 −0 04 - SuperDB/Classes/HeroEditController.h
  32. +148 −0 04 - SuperDB/Classes/HeroEditController.m
  33. +25 −0 04 - SuperDB/Classes/HeroListViewController.h
  34. +339 −0 04 - SuperDB/Classes/HeroListViewController.m
  35. +526 −0 04 - SuperDB/Classes/HeroListViewController.xib
  36. +15 −0 04 - SuperDB/Classes/ManagedObjectAttributeEditor.h
  37. +46 −0 04 - SuperDB/Classes/ManagedObjectAttributeEditor.m
  38. +11 −0 04 - SuperDB/Classes/ManagedObjectDateEditor.h
  39. +89 −0 04 - SuperDB/Classes/ManagedObjectDateEditor.m
  40. +11 −0 04 - SuperDB/Classes/ManagedObjectSingleSelectionListEditor.h
  41. +75 −0 04 - SuperDB/Classes/ManagedObjectSingleSelectionListEditor.m
  42. +9 −0 04 - SuperDB/Classes/ManagedObjectStringEditor.h
  43. +74 −0 04 - SuperDB/Classes/ManagedObjectStringEditor.m
  44. +30 −0 04 - SuperDB/Classes/SuperDBAppDelegate.h
  45. +142 −0 04 - SuperDB/Classes/SuperDBAppDelegate.m
  46. +21 −0 04 - SuperDB/HeroValueDisplay.h
  47. +30 −0 04 - SuperDB/HeroValueDisplay.m
  48. +634 −0 04 - SuperDB/MainWindow.xib
  49. +16 −0 04 - SuperDB/NSArray-NestedArrays.h
  50. +21 −0 04 - SuperDB/NSArray-NestedArrays.m
  51. +30 −0 04 - SuperDB/SuperDB-Info.plist
  52. +96 −0 04 - SuperDB/SuperDB.xcdatamodel/.svn/entries
  53. +5 −0 04 - SuperDB/SuperDB.xcdatamodel/.svn/prop-base/elements.svn-base
  54. +5 −0 04 - SuperDB/SuperDB.xcdatamodel/.svn/prop-base/layout.svn-base
  55. BIN 04 - SuperDB/SuperDB.xcdatamodel/.svn/text-base/elements.svn-base
  56. BIN 04 - SuperDB/SuperDB.xcdatamodel/.svn/text-base/layout.svn-base
  57. BIN 04 - SuperDB/SuperDB.xcdatamodel/elements
  58. BIN 04 - SuperDB/SuperDB.xcdatamodel/layout
  59. +164 −0 04 - SuperDB/SuperDB.xcodeproj/.svn/entries
  60. +5 −0 04 - SuperDB/SuperDB.xcodeproj/.svn/prop-base/project.pbxproj.svn-base
  61. +1,389 −0 04 - SuperDB/SuperDB.xcodeproj/.svn/text-base/jeff.mode1v3.svn-base
  62. +686 −0 04 - SuperDB/SuperDB.xcodeproj/.svn/text-base/jeff.pbxuser.svn-base
  63. +1,544 −0 04 - SuperDB/SuperDB.xcodeproj/.svn/text-base/jeff.perspectivev3.svn-base
  64. +324 −0 04 - SuperDB/SuperDB.xcodeproj/.svn/text-base/project.pbxproj.svn-base
  65. +1,389 −0 04 - SuperDB/SuperDB.xcodeproj/jeff.mode1v3
  66. +618 −0 04 - SuperDB/SuperDB.xcodeproj/jeff.pbxuser
  67. +1,549 −0 04 - SuperDB/SuperDB.xcodeproj/jeff.perspectivev3
  68. +324 −0 04 - SuperDB/SuperDB.xcodeproj/project.pbxproj
  69. +15 −0 04 - SuperDB/SuperDB_Prefix.pch
  70. +17 −0 04 - SuperDB/main.m
  71. BIN 04 - SuperDB/name_icon.png
  72. BIN 04 - SuperDB/secret_icon.png
  73. BIN 07 - SuperDB/.DS_Store
  74. +581 −0 07 - SuperDB/.svn/entries
  75. +5 −0 07 - SuperDB/.svn/prop-base/name_icon.png.svn-base
  76. +5 −0 07 - SuperDB/.svn/prop-base/secret_icon.png.svn-base
  77. +25 −0 07 - SuperDB/.svn/text-base/HeroValueDisplay.h.svn-base
  78. +36 −0 07 - SuperDB/.svn/text-base/HeroValueDisplay.m.svn-base
  79. +632 −0 07 - SuperDB/.svn/text-base/MainWindow.xib.svn-base
  80. +9 −0 07 - SuperDB/.svn/text-base/ManagedObjectFetchedPropertyDisplayer.h.svn-base
  81. +47 −0 07 - SuperDB/.svn/text-base/ManagedObjectFetchedPropertyDisplayer.m.svn-base
  82. +16 −0 07 - SuperDB/.svn/text-base/NSArray-NestedArrays.h.svn-base
  83. +21 −0 07 - SuperDB/.svn/text-base/NSArray-NestedArrays.m.svn-base
  84. +5 −0 07 - SuperDB/.svn/text-base/NSArray-Set.h.svn-base
  85. +15 −0 07 - SuperDB/.svn/text-base/NSArray-Set.m.svn-base
  86. +10 −0 07 - SuperDB/.svn/text-base/NSManagedObject-IsNew.h.svn-base
  87. +10 −0 07 - SuperDB/.svn/text-base/NSManagedObject-IsNew.m.svn-base
  88. +30 −0 07 - SuperDB/.svn/text-base/SuperDB-Info.plist.svn-base
  89. +15 −0 07 - SuperDB/.svn/text-base/SuperDB_Prefix.pch.svn-base
  90. +17 −0 07 - SuperDB/.svn/text-base/main.m.svn-base
  91. BIN 07 - SuperDB/.svn/text-base/name_icon.png.svn-base
  92. BIN 07 - SuperDB/.svn/text-base/secret_icon.png.svn-base
  93. +810 −0 07 - SuperDB/Classes/.svn/entries
  94. +35 −0 07 - SuperDB/Classes/.svn/text-base/Hero.h.svn-base
  95. +78 −0 07 - SuperDB/Classes/.svn/text-base/Hero.m.svn-base
  96. +25 −0 07 - SuperDB/Classes/.svn/text-base/HeroListViewController.h.svn-base
  97. +348 −0 07 - SuperDB/Classes/.svn/text-base/HeroListViewController.m.svn-base
  98. +568 −0 07 - SuperDB/Classes/.svn/text-base/HeroListViewController.xib.svn-base
  99. +16 −0 07 - SuperDB/Classes/.svn/text-base/ManagedObjectAttributeEditor.h.svn-base
  100. +81 −0 07 - SuperDB/Classes/.svn/text-base/ManagedObjectAttributeEditor.m.svn-base
  101. +22 −0 07 - SuperDB/Classes/.svn/text-base/ManagedObjectColorEditor.h.svn-base
  102. +128 −0 07 - SuperDB/Classes/.svn/text-base/ManagedObjectColorEditor.m.svn-base
  103. +11 −0 07 - SuperDB/Classes/.svn/text-base/ManagedObjectDateEditor.h.svn-base
  104. +84 −0 07 - SuperDB/Classes/.svn/text-base/ManagedObjectDateEditor.m.svn-base
  105. +11 −0 07 - SuperDB/Classes/.svn/text-base/ManagedObjectEditor-SuperDB.h.svn-base
  106. +165 −0 07 - SuperDB/Classes/.svn/text-base/ManagedObjectEditor-SuperDB.m.svn-base
  107. +23 −0 07 - SuperDB/Classes/.svn/text-base/ManagedObjectEditor.h.svn-base
  108. +349 −0 07 - SuperDB/Classes/.svn/text-base/ManagedObjectEditor.m.svn-base
  109. +11 −0 07 - SuperDB/Classes/.svn/text-base/ManagedObjectSingleSelectionListEditor.h.svn-base
  110. +76 −0 07 - SuperDB/Classes/.svn/text-base/ManagedObjectSingleSelectionListEditor.m.svn-base
  111. +10 −0 07 - SuperDB/Classes/.svn/text-base/ManagedObjectStringEditor.h.svn-base
  112. +70 −0 07 - SuperDB/Classes/.svn/text-base/ManagedObjectStringEditor.m.svn-base
  113. +30 −0 07 - SuperDB/Classes/.svn/text-base/SuperDBAppDelegate.h.svn-base
  114. +140 −0 07 - SuperDB/Classes/.svn/text-base/SuperDBAppDelegate.m.svn-base
  115. +8 −0 07 - SuperDB/Classes/.svn/text-base/UIColorRGBValueTransformer.h.svn-base
  116. +36 −0 07 - SuperDB/Classes/.svn/text-base/UIColorRGBValueTransformer.m.svn-base
  117. +391 −0 07 - SuperDB/Classes/.svn/tmp/HeroListViewController.m.tmp
  118. +35 −0 07 - SuperDB/Classes/Hero.h
  119. +78 −0 07 - SuperDB/Classes/Hero.m
  120. +25 −0 07 - SuperDB/Classes/HeroListViewController.h
  121. +347 −0 07 - SuperDB/Classes/HeroListViewController.m
  122. +568 −0 07 - SuperDB/Classes/HeroListViewController.xib
  123. +16 −0 07 - SuperDB/Classes/ManagedObjectAttributeEditor.h
  124. +81 −0 07 - SuperDB/Classes/ManagedObjectAttributeEditor.m
  125. +22 −0 07 - SuperDB/Classes/ManagedObjectColorEditor.h
Sorry, we could not display the entire diff because too many files (4,933) changed.
View
BIN .DS_Store
Binary file not shown.
View
377 04 - SuperDB/.svn/entries
@@ -0,0 +1,377 @@
+10
+
+dir
+23
+file:///Volumes/Backup/Subversion/MoreiPhoneDevelopment/trunk/04%20-%20SuperDB
+file:///Volumes/Backup/Subversion/MoreiPhoneDevelopment
+
+
+
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0ba7a3b8-34ef-46be-87cb-7deda305d9f2
+
+main.m
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+9a82c263409fdcdd7258596b57fcbcd2
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+348
+
+SuperDB.xcodeproj
+dir
+
+secret_icon.png
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+23d2e3e55546a3a6fe1a8ff484d26415
+2009-11-28T20:04:54.333894Z
+8
+jeff
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1607
+
+HeroValueDisplay.h
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+3168f86dc188c85e741f2939117ef266
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+488
+
+NSArray-NestedArrays.h
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+8a7260dd9771644584c33cea17c0cf8f
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+442
+
+SuperDB-Info.plist
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+c7dc95b665b1ce9088e5cb399ebdf987
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+907
+
+SuperDB.xcdatamodel
+dir
+
+SuperDB_Prefix.pch
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+28c30c360411045b507706e2a3d5bbe1
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+354
+
+HeroValueDisplay.m
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+bc843f4d6fda18f1ac4caa73e8b56af2
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+728
+
+name_icon.png
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+177e4a60256a98b98215b74ffafe2da7
+2009-11-28T20:04:54.333894Z
+8
+jeff
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3476
+
+NSArray-NestedArrays.m
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+3b43f589e3df701d60cb848c3d527480
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+548
+
+Classes
+dir
+
+MainWindow.xib
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+bda4f9c4a907465cd4fbc6feced0da7b
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+28391
+
View
5 04 - SuperDB/.svn/prop-base/name_icon.png.svn-base
@@ -0,0 +1,5 @@
+K 13
+svn:mime-type
+V 24
+application/octet-stream
+END
View
5 04 - SuperDB/.svn/prop-base/secret_icon.png.svn-base
@@ -0,0 +1,5 @@
+K 13
+svn:mime-type
+V 24
+application/octet-stream
+END
View
21 04 - SuperDB/.svn/text-base/HeroValueDisplay.h.svn-base
@@ -0,0 +1,21 @@
+#import <Foundation/Foundation.h>
+
+@protocol HeroValueDisplay
+- (NSString *)heroValueDisplay;
+@end
+
+@interface NSString (HeroValueDisplay) <HeroValueDisplay>
+- (NSString *)heroValueDisplay;
+@end
+
+@interface NSDate (HeroValueDisplay) <HeroValueDisplay>
+- (NSString *)heroValueDisplay;
+@end
+
+@interface NSNumber (HeroValueDisplay) <HeroValueDisplay>
+- (NSString *)heroValueDisplay;
+@end
+
+@interface NSDecimalNumber (HeroValueDisplay) <HeroValueDisplay>
+- (NSString *)heroValueDisplay;
+@end
View
30 04 - SuperDB/.svn/text-base/HeroValueDisplay.m.svn-base
@@ -0,0 +1,30 @@
+#import "HeroValueDisplay.h"
+
+@implementation NSString (HeroValueDisplay)
+- (NSString *)heroValueDisplay {
+ return self;
+}
+@end
+
+@implementation NSDate (HeroValueDisplay)
+- (NSString *)heroValueDisplay {
+
+ NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
+ [formatter setDateStyle:NSDateFormatterMediumStyle];
+ NSString *ret = [formatter stringFromDate:self];
+ [formatter release];
+ return ret;
+}
+@end
+
+@implementation NSNumber (HeroValueDisplay)
+- (NSString *)heroValueDisplay {
+ return [self descriptionWithLocale:[NSLocale currentLocale]];
+}
+@end
+
+@implementation NSDecimalNumber (HeroValueDisplay)
+- (NSString *)heroValueDisplay {
+ return [self descriptionWithLocale:[NSLocale currentLocale]];
+}
+@end
View
634 04 - SuperDB/.svn/text-base/MainWindow.xib.svn-base
@@ -0,0 +1,634 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">784</int>
+ <string key="IBDocument.SystemVersion">10A432</string>
+ <string key="IBDocument.InterfaceBuilderVersion">732</string>
+ <string key="IBDocument.AppKitVersion">1038</string>
+ <string key="IBDocument.HIToolboxVersion">437.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">62</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="23"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ </object>
+ <object class="IBProxyObject" id="427554174">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ </object>
+ <object class="IBUICustomObject" id="664661524"/>
+ <object class="IBUIWindow" id="117978783">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{320, 480}</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ </object>
+ <object class="IBUINavigationController" id="35008513">
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <object class="IBUINavigationBar" key="IBUINavigationBar" id="462886416">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrameSize">{0, 0}</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="IBUIViewControllers">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUIViewController" id="1041418004">
+ <object class="IBUINavigationItem" key="IBUINavigationItem" id="1007858538">
+ <string key="IBUITitle">SuperDB</string>
+ </object>
+ <reference key="IBUIParentViewController" ref="35008513"/>
+ </object>
+ </object>
+ </object>
+ <object class="IBUITableViewController" id="668357832">
+ <object class="IBUITableView" key="IBUIView" id="835830907">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrameSize">{320, 460}</string>
+ <reference key="NSSuperview"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <int key="IBUIStyle">1</int>
+ <int key="IBUISeparatorStyle">1</int>
+ <int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
+ <bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
+ <float key="IBUIRowHeight">44</float>
+ <float key="IBUISectionHeaderHeight">10</float>
+ <float key="IBUISectionFooterHeight">10</float>
+ </object>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="664661524"/>
+ </object>
+ <int key="connectionID">4</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="117978783"/>
+ </object>
+ <int key="connectionID">14</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">navController</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="35008513"/>
+ </object>
+ <int key="connectionID">21</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="835830907"/>
+ <reference key="destination" ref="668357832"/>
+ </object>
+ <int key="connectionID">25</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">dataSource</string>
+ <reference key="source" ref="835830907"/>
+ <reference key="destination" ref="668357832"/>
+ </object>
+ <int key="connectionID">26</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">detailController</string>
+ <reference key="source" ref="1041418004"/>
+ <reference key="destination" ref="668357832"/>
+ </object>
+ <int key="connectionID">27</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="664661524"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">SuperDB App Delegate</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="427554174"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">12</int>
+ <reference key="object" ref="117978783"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">17</int>
+ <reference key="object" ref="35008513"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1041418004"/>
+ <reference ref="462886416"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">18</int>
+ <reference key="object" ref="1041418004"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1007858538"/>
+ </object>
+ <reference key="parent" ref="35008513"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">19</int>
+ <reference key="object" ref="462886416"/>
+ <reference key="parent" ref="35008513"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">20</int>
+ <reference key="object" ref="1007858538"/>
+ <reference key="parent" ref="1041418004"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">23</int>
+ <reference key="object" ref="668357832"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="835830907"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">24</int>
+ <reference key="object" ref="835830907"/>
+ <reference key="parent" ref="668357832"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>12.IBEditorWindowLastContentRect</string>
+ <string>12.IBPluginDependency</string>
+ <string>17.IBEditorWindowLastContentRect</string>
+ <string>17.IBPluginDependency</string>
+ <string>18.CustomClassName</string>
+ <string>18.IBPluginDependency</string>
+ <string>19.IBPluginDependency</string>
+ <string>20.IBPluginDependency</string>
+ <string>23.CustomClassName</string>
+ <string>23.IBEditorWindowLastContentRect</string>
+ <string>23.IBPluginDependency</string>
+ <string>24.IBPluginDependency</string>
+ <string>3.CustomClassName</string>
+ <string>3.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIApplication</string>
+ <string>UIResponder</string>
+ <string>{{525, 346}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{0, 665}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>HeroListViewController</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>HeroEditController</string>
+ <string>{{0, 665}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>SuperDBAppDelegate</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">27</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">HeroEditController</string>
+ <string key="superclassName">UITableViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/HeroEditController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">HeroListViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>detailController</string>
+ <string>tabBar</string>
+ <string>tableView</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>HeroEditController</string>
+ <string>UITabBar</string>
+ <string>UITableView</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/HeroListViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">HeroListViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SuperDBAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>navController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UINavigationController</string>
+ <string>UIWindow</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/SuperDBAppDelegate.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SuperDBAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSNetServices.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSPort.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSStream.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSXMLParser.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="652609225">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIApplication</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIBarButtonItem</string>
+ <string key="superclassName">UIBarItem</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIBarItem</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIBarItem.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UINavigationBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="445149700">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINavigationBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UINavigationController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="849966236">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UINavigationItem</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="445149700"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIResponder</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="652609225"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIScrollView</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIScrollView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchDisplayController</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UITabBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITabBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UITableView</string>
+ <string key="superclassName">UIScrollView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITableView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UITableViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITableViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <reference key="sourceIdentifier" ref="849966236"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIWindow</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <integer value="784" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <integer value="784" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3100" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">SuperDB.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">3.1</string>
+ </data>
+</archive>
View
16 04 - SuperDB/.svn/text-base/NSArray-NestedArrays.h.svn-base
@@ -0,0 +1,16 @@
+#import <Foundation/Foundation.h>
+
+@interface NSArray(NestedArrays)
+/**
+ This method will return an object contained with an array
+ contained within this array. It is intended to allow
+ single-step retrieval of objects in the nested array
+ using an index path
+ */
+- (id)nestedObjectAtIndexPath:(NSIndexPath *)indexPath;
+
+/**
+ This method will return the count from a subarray.
+ */
+- (NSInteger)countOfNestedArray:(NSUInteger)section;
+@end
View
21 04 - SuperDB/.svn/text-base/NSArray-NestedArrays.m.svn-base
@@ -0,0 +1,21 @@
+#import "NSArray-NestedArrays.h"
+
+@implementation NSArray(NestedArrays)
+- (id)nestedObjectAtIndexPath:(NSIndexPath *)indexPath {
+ NSUInteger row = [indexPath row];
+ NSUInteger section = [indexPath section];
+ NSArray *subArray = [self objectAtIndex:section];
+
+ if (![subArray isKindOfClass:[NSArray class]])
+ return nil;
+
+ if (row >= [subArray count])
+ return nil;
+
+ return [subArray objectAtIndex:row];
+}
+- (NSInteger)countOfNestedArray:(NSUInteger)section {
+ NSArray *subArray = [self objectAtIndex:section];
+ return [subArray count];
+}
+@end
View
30 04 - SuperDB/.svn/text-base/SuperDB-Info.plist.svn-base
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.innerLoop.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
+</dict>
+</plist>
View
15 04 - SuperDB/.svn/text-base/SuperDB_Prefix.pch.svn-base
@@ -0,0 +1,15 @@
+//
+// Prefix header for all source files of the 'SuperDB' target in the 'SuperDB' project
+//
+#import <Availability.h>
+
+#ifndef __IPHONE_3_0
+#warning "This project uses features only available in iPhone SDK 3.0 and later."
+#endif
+
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+ #import <UIKit/UIKit.h>
+ #import <CoreData/CoreData.h>
+#endif
View
17 04 - SuperDB/.svn/text-base/main.m.svn-base
@@ -0,0 +1,17 @@
+//
+// main.m
+// SuperDB
+//
+// Created by jeff on 9/5/09.
+// Copyright Jeff LaMarche 2009. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+int main(int argc, char *argv[]) {
+
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+ int retVal = UIApplicationMain(argc, argv, nil, nil);
+ [pool release];
+ return retVal;
+}
View
BIN 04 - SuperDB/.svn/text-base/name_icon.png.svn-base
Binary file not shown.
View
BIN 04 - SuperDB/.svn/text-base/secret_icon.png.svn-base
Binary file not shown.
View
538 04 - SuperDB/Classes/.svn/entries
@@ -0,0 +1,538 @@
+10
+
+dir
+23
+file:///Volumes/Backup/Subversion/MoreiPhoneDevelopment/trunk/04%20-%20SuperDB/Classes
+file:///Volumes/Backup/Subversion/MoreiPhoneDevelopment
+
+
+
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0ba7a3b8-34ef-46be-87cb-7deda305d9f2
+
+HeroListViewController.m
+file
+35
+
+
+
+2009-12-29T22:17:17.000000Z
+73d273b3892e69ec968c176fc00065e2
+2010-01-18T13:08:51.911138Z
+35
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+15083
+
+ManagedObjectDateEditor.m
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+6c77926ef7fd3e9d6f31088efd77d6aa
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3234
+
+ManagedObjectSingleSelectionListEditor.h
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+3e364b6c436c8ba586d9b6079645ebab
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+284
+
+SuperDBAppDelegate.h
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+c01065e820abcfc5eb3b229221c7bf14
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+894
+
+ManagedObjectSingleSelectionListEditor.m
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+16d96eff3e17d14e5df6c4a1d1845000
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2968
+
+SuperDBAppDelegate.m
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+b498d0d3d3bfdb2d0bea53ceb995ff95
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+4567
+
+HeroEditController.h
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+c6d6f62ae7e226fba8d4540e1a190815
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+361
+
+HeroEditController.m
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+dcc21e758cdc954457c41b9e9357a63f
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+5344
+
+ManagedObjectAttributeEditor.h
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+742f7e6575508827a7456935b2822dac
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+518
+
+ManagedObjectStringEditor.h
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+7424ff9a2c870578a4d887dc33c33989
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+196
+
+HeroListViewController.xib
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+b21bd0f0bdb12beb434d79b20df1b05e
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+23363
+
+ManagedObjectAttributeEditor.m
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+dcd7ad7b4530fd030aa45a3270d5099d
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2015
+
+ManagedObjectStringEditor.m
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+231306a437781d3cf0b0ed7fd5e624a6
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3030
+
+HeroListViewController.h
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+6b059745a696fee9c7f38f80d29e2502
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+829
+
+ManagedObjectDateEditor.h
+file
+
+
+
+
+2009-11-28T20:09:52.000000Z
+b0496e950ed7aa815e377b1959e2b4f8
+2009-11-28T20:04:54.333894Z
+8
+jeff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+357
+
View
16 04 - SuperDB/Classes/.svn/text-base/HeroEditController.h.svn-base
@@ -0,0 +1,16 @@
+#import <UIKit/UIKit.h>
+
+
+@interface HeroEditController : UITableViewController {
+ NSManagedObject *hero;
+
+@private
+ NSArray *sectionNames;
+ NSArray *rowLabels;
+ NSArray *rowKeys;
+ NSArray *rowControllers;
+ NSArray *rowArguments;
+
+}
+@property (nonatomic, retain) NSManagedObject *hero;
+@end
View
148 04 - SuperDB/Classes/.svn/text-base/HeroEditController.m.svn-base
@@ -0,0 +1,148 @@
+#import "HeroEditController.h"
+#import "NSArray-NestedArrays.h"
+#import "HeroValueDisplay.h"
+#import "ManagedObjectAttributeEditor.h"
+@implementation HeroEditController
+@synthesize hero;
+- (void)viewWillAppear:(BOOL)animated {
+ [self.tableView reloadData];
+ [super viewWillAppear:animated];
+}
+- (void)viewDidLoad {
+ sectionNames = [[NSArray alloc] initWithObjects:
+ [NSNull null],
+ NSLocalizedString(@"General", @"General"),
+ nil];
+ rowLabels = [[NSArray alloc] initWithObjects:
+
+ // Section 1
+ [NSArray arrayWithObjects:NSLocalizedString(@"Name", @"Name"), nil],
+
+ // Section 2
+ [NSArray arrayWithObjects:NSLocalizedString(@"Identity", @"Identity"),
+ NSLocalizedString(@"Birthdate", @"Birthdate"),
+ NSLocalizedString(@"Sex", @"Sex"),
+ nil],
+
+ // Sentinel
+ nil];
+
+ rowKeys = [[NSArray alloc] initWithObjects:
+
+ // Section 1
+ [NSArray arrayWithObjects:@"name", nil],
+
+ // Section 2
+ [NSArray arrayWithObjects:@"secretIdentity", @"birthdate", @"sex", nil],
+
+ // Sentinel
+ nil];
+
+ rowControllers = [[NSArray alloc] initWithObjects:
+
+ // Section 1
+ [NSArray arrayWithObject:@"ManagedObjectStringEditor"],
+
+ // Section 2
+ [NSArray arrayWithObjects:@"ManagedObjectStringEditor",
+ @"ManagedObjectDateEditor",
+ @"ManagedObjectSingleSelectionListEditor", nil],
+
+ // Sentinel
+ nil];
+ rowArguments = [[NSArray alloc] initWithObjects:
+
+ // Section 1
+ [NSArray arrayWithObject:[NSNull null]],
+
+ // Section 2,
+ [NSArray arrayWithObjects:[NSNull null],
+ [NSNull null],
+ [NSDictionary dictionaryWithObject:[NSArray
+ arrayWithObjects:@"Male", @"Female", nil]
+ forKey:@"list"],
+ nil],
+
+ // Sentinel
+ nil];
+
+
+
+ [super viewDidLoad];
+}
+- (void)dealloc {
+ [hero release];
+ [sectionNames release];
+ [rowLabels release];
+ [rowKeys release];
+ [rowControllers release];
+ [super dealloc];
+}
+
+#pragma mark -
+#pragma mark Table View Methods
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+ return [sectionNames count];
+}
+- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
+ id theTitle = [sectionNames objectAtIndex:section];
+ if ([theTitle isKindOfClass:[NSNull class]])
+ return nil;
+
+ return theTitle;
+}
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+ return [rowLabels countOfNestedArray:section];
+}
+- (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+
+ static NSString *CellIdentifier = @"Hero Edit Cell Identifier";
+
+ UITableViewCell *cell = [theTableView
+ dequeueReusableCellWithIdentifier:CellIdentifier];
+ if (cell == nil) {
+ cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2
+ reuseIdentifier:CellIdentifier] autorelease];
+ }
+
+ NSString *rowKey = [rowKeys nestedObjectAtIndexPath:indexPath];
+ NSString *rowLabel = [rowLabels nestedObjectAtIndexPath:indexPath];
+
+ id <HeroValueDisplay> rowValue = [hero valueForKey:rowKey];
+
+ cell.detailTextLabel.text = [rowValue heroValueDisplay];
+ cell.textLabel.text = rowLabel;
+ cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+ return cell;
+}
+- (void)tableView:(UITableView *)tableView
+didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+
+ NSString *controllerClassName = [rowControllers
+ nestedObjectAtIndexPath:indexPath];
+ NSString *rowLabel = [rowLabels nestedObjectAtIndexPath:indexPath];
+ NSString *rowKey = [rowKeys nestedObjectAtIndexPath:indexPath];
+ Class controllerClass = NSClassFromString(controllerClassName);
+ ManagedObjectAttributeEditor *controller =
+ [controllerClass alloc];
+ controller = [controller initWithStyle:UITableViewStyleGrouped];
+ controller.keypath = rowKey;
+ controller.managedObject = hero;
+ controller.labelString = rowLabel;
+ controller.title = rowLabel;
+
+ NSDictionary *args = [rowArguments nestedObjectAtIndexPath:indexPath];
+ if ([args isKindOfClass:[NSDictionary class]]) {
+ if (args != nil) {
+ for (NSString *oneKey in args) {
+ id oneArg = [args objectForKey:oneKey];
+ [controller setValue:oneArg forKey:oneKey];
+ }
+ }
+ }
+
+ [self.navigationController pushViewController:controller animated:YES];
+ [controller release];
+}
+
+@end
View
24 04 - SuperDB/Classes/.svn/text-base/HeroListViewController.h.svn-base
@@ -0,0 +1,24 @@
+#import <UIKit/UIKit.h>
+
+#define kSelectedTabDefaultsKey @"Selected Tab"
+enum {
+ kByName = 0,
+ kBySecretIdentity,
+};
+@class HeroEditController;
+@interface HeroListViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, UITabBarDelegate, UIAlertViewDelegate, NSFetchedResultsControllerDelegate>{
+
+ UITableView *tableView;
+ UITabBar *tabBar;
+ HeroEditController *detailController;
+
+@private
+ NSFetchedResultsController *_fetchedResultsController;
+}
+@property (nonatomic, retain) IBOutlet UITableView *tableView;
+@property (nonatomic, retain) IBOutlet UITabBar *tabBar;
+@property (nonatomic, retain) IBOutlet HeroEditController *detailController;
+@property (nonatomic, readonly) NSFetchedResultsController *fetchedResultsController;
+- (void)addHero;
+- (IBAction)toggleEdit;
+@end
View
326 04 - SuperDB/Classes/.svn/text-base/HeroListViewController.m.svn-base
@@ -0,0 +1,326 @@
+#import "HeroListViewController.h"
+#import "SuperDBAppDelegate.h"
+#import "HeroEditController.h"
+
+@implementation HeroListViewController
+@synthesize tableView;
+@synthesize tabBar;
+@synthesize fetchedResultsController = _fetchedResultsController;
+@synthesize detailController;
+#pragma mark -
+- (void)addHero {
+ NSManagedObjectContext *context = [self.fetchedResultsController managedObjectContext];
+ NSEntityDescription *entity = [[self.fetchedResultsController fetchRequest] entity];
+ NSManagedObject *newManagedObject = [NSEntityDescription insertNewObjectForEntityForName:[entity name] inManagedObjectContext:context];
+
+ NSError *error;
+ if (![context save:&error])
+ NSLog(@"Error saving entity: %@", [error localizedDescription]);
+
+ detailController.hero = newManagedObject;
+ [self.navigationController pushViewController:detailController animated:YES];
+}
+- (IBAction)toggleEdit {
+ BOOL editing = !self.tableView.editing;
+ self.navigationItem.rightBarButtonItem.enabled = !editing;
+ self.navigationItem.leftBarButtonItem.title = (editing) ? NSLocalizedString(@"Done", @"Done") : NSLocalizedString(@"Edit", @"Edit");
+ [self.tableView setEditing:editing animated:YES];
+}
+- (void)viewDidLoad {
+ [super viewDidLoad];
+ NSError *error = nil;
+ if (![[self fetchedResultsController] performFetch:&error]) {
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error loading data", @"Error loading data")
+ message:[NSString stringWithFormat:@"Error was: %@, quitting.", [error localizedDescription]]
+ delegate:self
+ cancelButtonTitle:NSLocalizedString(@"Aw, Nuts", @"Aw, Nuts")
+ otherButtonTitles:nil];
+ [alert show];
+
+ }
+
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+ NSInteger selectedTab = [defaults integerForKey:kSelectedTabDefaultsKey];
+ UITabBarItem *item = [tabBar.items objectAtIndex:selectedTab];
+ [tabBar setSelectedItem:item];
+}
+- (void)viewDidAppear:(BOOL)animated {
+ UIBarButtonItem *editButton = self.editButtonItem;
+ [editButton setTarget:self];
+ [editButton setAction:@selector(toggleEdit)];
+ self.navigationItem.leftBarButtonItem = editButton;
+
+ UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addHero)];
+ self.navigationItem.rightBarButtonItem = addButton;
+ [addButton release];
+}
+
+- (void)viewDidUnload {
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
+ self.tableView = nil;
+ self.tabBar = nil;
+}
+
+
+- (void)dealloc {
+ [tableView release];
+ [tabBar release];
+ [_fetchedResultsController release];
+ [super dealloc];
+}
+#pragma mark -
+#pragma mark Table View Methods
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)theTableView {
+ NSUInteger count = [[self.fetchedResultsController sections] count];
+ if (count == 0) {
+ count = 1;
+ }
+ return count;
+}
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+ NSArray *sections = [self.fetchedResultsController sections];
+ NSUInteger count = 0;
+ if ([sections count]) {
+ id <NSFetchedResultsSectionInfo> sectionInfo = [sections objectAtIndex:section];
+ count = [sectionInfo numberOfObjects];
+ }
+ return count;
+}
+- (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+
+ static NSString *HeroTableViewCell = @"HeroTableViewCell";
+
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:HeroTableViewCell];
+ if (cell == nil) {
+ cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:HeroTableViewCell] autorelease];
+ }
+ NSManagedObject *oneHero = [self.fetchedResultsController objectAtIndexPath:indexPath];
+ NSInteger tab = [tabBar.items indexOfObject:tabBar.selectedItem];
+ switch (tab) {
+ case kByName:
+ cell.textLabel.text = [oneHero valueForKey:@"name"];
+ cell.detailTextLabel.text = [oneHero valueForKey:@"secretIdentity"];
+ break;
+ case kBySecretIdentity:
+ cell.detailTextLabel.text = [oneHero valueForKey:@"name"];
+ cell.textLabel.text = [oneHero valueForKey:@"secretIdentity"];
+ default:
+ break;
+ }
+
+ return cell;
+}
+- (void)tableView:(UITableView *)theTableView
+didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+ detailController.hero = [self.fetchedResultsController
+ objectAtIndexPath:indexPath];
+ [self.navigationController pushViewController:detailController animated:YES];
+ [tableView deselectRowAtIndexPath:indexPath animated:YES];
+
+}
+
+- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
+
+ if (editingStyle == UITableViewCellEditingStyleDelete) {
+ NSManagedObjectContext *context = [self.fetchedResultsController managedObjectContext];
+ [context deleteObject:[self.fetchedResultsController objectAtIndexPath:indexPath]];
+
+ NSError *error;
+ if (![context save:&error]) {
+ NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error saving after delete", @"Error saving after delete.")
+ message:[NSString stringWithFormat:@"Error was: %@, quitting.", [error localizedDescription]]
+ delegate:self
+ cancelButtonTitle:NSLocalizedString(@"Aw, Nuts", @"Aw, Nuts")
+ otherButtonTitles:nil];
+ [alert show];
+ exit(-1);
+ }
+ }
+}
+#pragma mark -
+#pragma mark Fetched results controller
+- (NSFetchedResultsController *)fetchedResultsController {
+
+ if (_fetchedResultsController != nil) {
+ return _fetchedResultsController;
+ }
+
+ NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
+
+ // The typecast on the next line is not ordinarily necessary, however without it, we get a warning about
+ // the returned object not conforming to UITabBarDelegate. The typecast quiets the warning so we get
+ // a clean build.
+ SuperDBAppDelegate *appDelegate = (SuperDBAppDelegate *)[[UIApplication sharedApplication] delegate];
+ NSManagedObjectContext *managedObjectContext = appDelegate.managedObjectContext;
+
+ NSEntityDescription *entity = [NSEntityDescription entityForName:@"Hero" inManagedObjectContext:managedObjectContext];
+
+
+ NSUInteger tab = [tabBar.items indexOfObject:tabBar.selectedItem];
+ if (tab == NSNotFound) {
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+ tab = [defaults integerForKey:kSelectedTabDefaultsKey];
+ }
+
+ NSString *sectionKey = nil;
+ switch (tab) {
+ // Notice that the kByName and kBySecretIdentity Code are nearly identical - refactoring opportunity?
+ case kByName: {
+ NSSortDescriptor *sortDescriptor1 = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES];
+ NSSortDescriptor *sortDescriptor2 = [[NSSortDescriptor alloc] initWithKey:@"secretIdentity" ascending:YES];
+ NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor1, sortDescriptor2, nil];
+ [fetchRequest setSortDescriptors:sortDescriptors];
+ [sortDescriptor1 release];
+ [sortDescriptor2 release];
+ [sortDescriptors release];
+ sectionKey = @"name";
+ break;
+ }
+ case kBySecretIdentity:{
+ NSSortDescriptor *sortDescriptor1 = [[NSSortDescriptor alloc] initWithKey:@"secretIdentity" ascending:YES];
+ NSSortDescriptor *sortDescriptor2 = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES];
+ NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor1, sortDescriptor2, nil];
+ [fetchRequest setSortDescriptors:sortDescriptors];
+ [sortDescriptor1 release];
+ [sortDescriptor2 release];
+ [sortDescriptors release];
+ sectionKey = @"secretIdentity";
+ break;
+ }
+ default:
+ break;
+
+ }
+ [fetchRequest setEntity:entity];
+ [fetchRequest setFetchBatchSize:20];
+
+
+ NSFetchedResultsController *frc = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest
+ managedObjectContext:managedObjectContext
+ sectionNameKeyPath:sectionKey
+ cacheName:@"Hero"];
+ frc.delegate = self;
+ _fetchedResultsController = frc;
+
+ [fetchRequest release];
+
+ return _fetchedResultsController;
+}
+- (void)controllerWillChangeContent:(NSFetchedResultsController *)controller {
+ [self.tableView beginUpdates];
+}
+- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller {
+ [self.tableView endUpdates];
+}
+- (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath {
+ switch(type) {
+ case NSFetchedResultsChangeInsert:
+ [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade];
+ break;
+ case NSFetchedResultsChangeDelete:
+ [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
+ break;
+ case NSFetchedResultsChangeUpdate: {
+ NSString *sectionKeyPath = [controller sectionNameKeyPath];
+ if (sectionKeyPath == nil)
+ break;
+ NSManagedObject *changedObject = [controller objectAtIndexPath:indexPath];
+ NSArray *keyParts = [sectionKeyPath componentsSeparatedByString:@"."];
+ id currentKeyValue = [changedObject valueForKeyPath:sectionKeyPath];
+ for (int i = 0; i < [keyParts count] - 1; i++) {
+ NSString *onePart = [keyParts objectAtIndex:i];
+ changedObject = [changedObject valueForKey:onePart];
+ }
+ sectionKeyPath = [keyParts lastObject];
+ NSDictionary *committedValues = [changedObject committedValuesForKeys:nil];
+
+ if ([[committedValues valueForKeyPath:sectionKeyPath] isEqual:currentKeyValue])
+ break;
+
+ NSUInteger tableSectionCount = [self.tableView numberOfSections];
+ NSUInteger frcSectionCount = [[controller sections] count];
+ if (tableSectionCount != frcSectionCount) {
+ // Need to insert a section
+ NSArray *sections = controller.sections;
+ NSInteger newSectionLocation = -1;
+ for (id oneSection in sections) {
+ NSString *sectionName = [oneSection name];
+ if ([currentKeyValue isEqual:sectionName]) {
+ newSectionLocation = [sections indexOfObject:oneSection];
+ break;
+ }
+ }
+ if (newSectionLocation == -1)
+ return; // uh oh
+
+ if (!((newSectionLocation == 0) && (tableSectionCount == 1) && ([self.tableView numberOfRowsInSection:0] == 0)))
+ [self.tableView insertSections:[NSIndexSet indexSetWithIndex:newSectionLocation] withRowAnimation:UITableViewRowAnimationFade];
+ NSUInteger indices[2] = {newSectionLocation, 0};
+ newIndexPath = [[[NSIndexPath alloc] initWithIndexes:indices length:2] autorelease];
+ }
+ }
+ case NSFetchedResultsChangeMove:
+ if (newIndexPath != nil) {
+
+ NSUInteger tableSectionCount = [self.tableView numberOfSections];
+ NSUInteger frcSectionCount = [[controller sections] count];
+ if (frcSectionCount != tableSectionCount)
+ [self.tableView insertSections:[NSIndexSet indexSetWithIndex:[newIndexPath section]] withRowAnimation:UITableViewRowAnimationNone];
+
+ [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
+ [self.tableView insertRowsAtIndexPaths: [NSArray arrayWithObject:newIndexPath]
+ withRowAnimation: UITableViewRowAnimationRight];
+
+ }
+ else {
+ [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:[indexPath section]] withRowAnimation:UITableViewRowAnimationFade];
+ }
+ break;
+ default:
+ break;
+ }
+}
+- (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id <NSFetchedResultsSectionInfo>)sectionInfo atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type {
+ switch(type) {
+
+ case NSFetchedResultsChangeInsert:
+ if (!((sectionIndex == 0) && ([self.tableView numberOfSections] == 1)))
+ [self.tableView insertSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationFade];
+ break;
+ case NSFetchedResultsChangeDelete:
+ if (!((sectionIndex == 0) && ([self.tableView numberOfSections] == 1) ))
+ [self.tableView deleteSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationFade];
+ break;
+ case NSFetchedResultsChangeMove:
+ break;
+ case NSFetchedResultsChangeUpdate:
+ break;
+ default:
+ break;
+ }
+}
+#pragma mark -
+#pragma mark UIAlertView Delegate
+- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
+ exit(-1);
+}
+
+#pragma mark -
+#pragma mark Tab Bar Delegate
+- (void)tabBar:(UITabBar *)theTabBar didSelectItem:(UITabBarItem *)item {
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+ NSUInteger tabIndex = [tabBar.items indexOfObject:item];
+ [defaults setInteger:tabIndex forKey:kSelectedTabDefaultsKey];
+
+ _fetchedResultsController.delegate = nil;
+ [_fetchedResultsController release];
+ _fetchedResultsController = nil;
+
+ NSError *error;
+ if (![self.fetchedResultsController performFetch:&error])
+ NSLog(@"Error performing fetch: %@", [error localizedDescription]);
+ [self.tableView reloadData];
+}
+@end
View
526 04 - SuperDB/Classes/.svn/text-base/HeroListViewController.xib.svn-base
@@ -0,0 +1,526 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">784</int>
+ <string key="IBDocument.SystemVersion">10A432</string>
+ <string key="IBDocument.InterfaceBuilderVersion">732</string>
+ <string key="IBDocument.AppKitVersion">1038</string>
+ <string key="IBDocument.HIToolboxVersion">437.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">62</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="1"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ </object>
+ <object class="IBProxyObject" id="975951072">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ </object>
+ <object class="IBUIView" id="191373211">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUITableView" id="701967834">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrameSize">{320, 411}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <bool key="IBUIBouncesZoom">NO</bool>
+ <int key="IBUISeparatorStyle">1</int>
+ <int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
+ <bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
+ <float key="IBUIRowHeight">44</float>
+ <float key="IBUISectionHeaderHeight">22</float>
+ <float key="IBUISectionFooterHeight">22</float>
+ </object>
+ <object class="IBUITabBar" id="262169127">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">266</int>
+ <string key="NSFrame">{{0, 411}, {320, 49}}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MCAwAA</bytes>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="NSMutableArray" key="IBUIItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUITabBarItem" id="38582879">
+ <string key="IBUITitle">By Name</string>
+ <object class="NSCustomResource" key="IBUIImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">name_icon.png</string>
+ </object>
+ <reference key="IBUITabBar" ref="262169127"/>
+ </object>
+ <object class="IBUITabBarItem" id="805062929">
+ <string key="IBUITitle">By Secret Identity</string>
+ <object class="NSCustomResource" key="IBUIImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">secret_icon.png</string>
+ </object>
+ <reference key="IBUITabBar" ref="262169127"/>
+ </object>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrameSize">{320, 460}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="191373211"/>
+ </object>
+ <int key="connectionID">3</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">tableView</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="701967834"/>
+ </object>
+ <int key="connectionID">17</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">tabBar</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="262169127"/>
+ </object>
+ <int key="connectionID">18</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">dataSource</string>
+ <reference key="source" ref="701967834"/>
+ <reference key="destination" ref="372490531"/>
+ </object>
+ <int key="connectionID">19</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="701967834"/>
+ <reference key="destination" ref="372490531"/>
+ </object>
+ <int key="connectionID">20</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="262169127"/>
+ <reference key="destination" ref="372490531"/>
+ </object>
+ <int key="connectionID">21</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="191373211"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="262169127"/>
+ <reference ref="701967834"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="975951072"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">13</int>
+ <reference key="object" ref="262169127"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="38582879"/>
+ <reference ref="805062929"/>
+ </o