<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -14,7 +14,7 @@
 		8D15AC320486D014006FF6A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
 		8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; };
 		AB0670A50DED05BE00E0ABDA /* Nu.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB0670A40DED05BE00E0ABDA /* Nu.framework */; };
-		AB0670A70DED05E400E0ABDA /* main.nu in Resources */ = {isa = PBXBuildFile; fileRef = AB0670A60DED05E400E0ABDA /* main.nu */; };
+		AB9402F70DF385F400D31812 /* main.nu in Resources */ = {isa = PBXBuildFile; fileRef = AB9402F60DF385F400D31812 /* main.nu */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
@@ -31,7 +31,7 @@
 		8D15AC360486D014006FF6A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = &quot;&lt;group&gt;&quot;; };
 		8D15AC370486D014006FF6A4 /* RaiseMan.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RaiseMan.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		AB0670A40DED05BE00E0ABDA /* Nu.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nu.framework; path = /Library/Frameworks/Nu.framework; sourceTree = &quot;&lt;absolute&gt;&quot;; };
-		AB0670A60DED05E400E0ABDA /* main.nu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.nu; path = nu/main.nu; sourceTree = &quot;&lt;group&gt;&quot;; };
+		AB9402F60DF385F400D31812 /* main.nu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.nu; path = nu/main.nu; sourceTree = &quot;&lt;group&gt;&quot;; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -119,7 +119,7 @@
 		AB0670A30DED05A900E0ABDA /* Nu */ = {
 			isa = PBXGroup;
 			children = (
-				AB0670A60DED05E400E0ABDA /* main.nu */,
+				AB9402F60DF385F400D31812 /* main.nu */,
 			);
 			name = Nu;
 			sourceTree = &quot;&lt;group&gt;&quot;;
@@ -171,7 +171,7 @@
 				8D15AC2D0486D014006FF6A4 /* MainMenu.nib in Resources */,
 				8D15AC2E0486D014006FF6A4 /* MyDocument.nib in Resources */,
 				8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */,
-				AB0670A70DED05E400E0ABDA /* main.nu in Resources */,
+				AB9402F70DF385F400D31812 /* main.nu in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};</diff>
      <filename>09_Undo/RaiseMan_A/RaiseMan.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -17,39 +17,12 @@
             (else (super setNilValueForKey:key)))))
 
 (class MyDocument is NSDocument
-    (ivar (id) employees (id) employeeController (id) tableView)
+    (ivar (id) employees)
     
     (- (id) init is
         (super init)
         (self setEmployees:(array))
         self)
-
-    (- (BOOL) endEditing is
-        (set w (@tableView window))
-        (set editingEnded (w makeFirstResponder:w))
-        (unless (editingEnded) NO)
-        (set undo (self undoManager))
-        (if (undo groupingLevel)
-            (undo endUndoGrouping)
-            (undo beginUndoGrouping))
-        YES)
-
-    (- (void) createEmployee: (id) sender is
-        ; If a field is being edited, end editing
-        (unless (eq NO (self endEditing))
-            
-            (set p (@employeeController newObject))
-            (@employeeController addObject:p)
-            
-            ; In case the user has sorted the content array
-            (@employeeController rearrangeObjects)
-            
-            ; Find the row of the new object
-            (set a (@employeeController arrangedObjects))
-            (set row (a indexOfObjectIdenticalTo:p))
-            
-            ; Start editing in the first column
-            (@tableView editColumn:0 row:row withEvent:nil select:YES)))
         
     (- (void) startObservingPerson: (id) person is
         (person addObserver:self</diff>
      <filename>09_Undo/RaiseMan_A/nu/main.nu</filename>
    </modified>
    <modified>
      <diff>@@ -14,7 +14,7 @@
 		8D15AC320486D014006FF6A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
 		8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; };
 		AB1DE74D0DF37472008275EC /* Nu.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB1DE74C0DF37472008275EC /* Nu.framework */; };
-		AB1DE7510DF37490008275EC /* main.nu in Resources */ = {isa = PBXBuildFile; fileRef = AB1DE7500DF37490008275EC /* main.nu */; };
+		AB9403130DF3861600D31812 /* main.nu in Resources */ = {isa = PBXBuildFile; fileRef = AB9403120DF3861600D31812 /* main.nu */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
@@ -31,7 +31,7 @@
 		8D15AC360486D014006FF6A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = &quot;&lt;group&gt;&quot;; };
 		8D15AC370486D014006FF6A4 /* RaiseMan.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RaiseMan.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		AB1DE74C0DF37472008275EC /* Nu.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nu.framework; path = /Library/Frameworks/Nu.framework; sourceTree = &quot;&lt;absolute&gt;&quot;; };
-		AB1DE7500DF37490008275EC /* main.nu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.nu; path = ../RaiseMan_A/nu/main.nu; sourceTree = SOURCE_ROOT; };
+		AB9403120DF3861600D31812 /* main.nu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.nu; path = nu/main.nu; sourceTree = &quot;&lt;group&gt;&quot;; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -119,7 +119,7 @@
 		AB1DE7480DF37461008275EC /* Nu */ = {
 			isa = PBXGroup;
 			children = (
-				AB1DE7500DF37490008275EC /* main.nu */,
+				AB9403120DF3861600D31812 /* main.nu */,
 			);
 			name = Nu;
 			sourceTree = &quot;&lt;group&gt;&quot;;
@@ -171,7 +171,7 @@
 				8D15AC2D0486D014006FF6A4 /* MainMenu.nib in Resources */,
 				8D15AC2E0486D014006FF6A4 /* MyDocument.nib in Resources */,
 				8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */,
-				AB1DE7510DF37490008275EC /* main.nu in Resources */,
+				AB9403130DF3861600D31812 /* main.nu in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};</diff>
      <filename>09_Undo/RaiseMan_B/RaiseMan.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -17,12 +17,39 @@
             (else (super setNilValueForKey:key)))))
 
 (class MyDocument is NSDocument
-    (ivar (id) employees)
+    (ivar (id) employees (id) employeeController (id) tableView)
     
     (- (id) init is
         (super init)
         (self setEmployees:(array))
         self)
+
+    (- (BOOL) endEditing is
+        (set w (@tableView window))
+        (set editingEnded (w makeFirstResponder:w))
+        (unless (editingEnded) NO)
+        (set undo (self undoManager))
+        (if (undo groupingLevel)
+            (undo endUndoGrouping)
+            (undo beginUndoGrouping))
+        YES)
+
+    (- (void) createEmployee: (id) sender is
+        ; If a field is being edited, end editing
+        (unless (eq NO (self endEditing))
+            
+            (set p (@employeeController newObject))
+            (@employeeController addObject:p)
+            
+            ; In case the user has sorted the content array
+            (@employeeController rearrangeObjects)
+            
+            ; Find the row of the new object
+            (set a (@employeeController arrangedObjects))
+            (set row (a indexOfObjectIdenticalTo:p))
+            
+            ; Start editing in the first column
+            (@tableView editColumn:0 row:row withEvent:nil select:YES)))
         
     (- (void) startObservingPerson: (id) person is
         (person addObserver:self</diff>
      <filename>09_Undo/RaiseMan_B/nu/main.nu</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6c225a8c1cbed4a1e37b0ebb1491bcce5a756e83</id>
    </parent>
  </parents>
  <author>
    <name>Jonathan Yedidia</name>
    <email>yedidia@merl.com</email>
  </author>
  <url>http://github.com/timburks/cocoa-programming-with-nu/commit/bdbfd5bcadb09b65615037693fd1ef34cf3adbfe</url>
  <id>bdbfd5bcadb09b65615037693fd1ef34cf3adbfe</id>
  <committed-date>2008-06-01T18:37:54-07:00</committed-date>
  <authored-date>2008-06-01T18:37:54-07:00</authored-date>
  <message>Fixed mix-up between 09_Undo/RaiseMan_A and 09_Undo/RaiseMan_B.</message>
  <tree>a4c84c13069ed41f8762b15de9650b163289ec89</tree>
  <committer>
    <name>Jonathan Yedidia</name>
    <email>yedidia@merl.com</email>
  </committer>
</commit>
