Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Completed conversion of 09_Undo.

  • Loading branch information...
commit 6c225a8c1cbed4a1e37b0ebb1491bcce5a756e83 1 parent 8abeb11
@jsyedidia jsyedidia authored
View
1  .gitignore
@@ -3,4 +3,5 @@
*.app
*.pbxuser
*.perspectivev3
+*.mode1v3
TemplateIcon.icns
View
24 09_Undo/RaiseMan_A/MyDocument.h
@@ -1,24 +0,0 @@
-//
-// MyDocument.h
-// RaiseMan
-//
-// Created by Aaron Hillegass on 9/24/07.
-// Copyright __MyCompanyName__ 2007 . All rights reserved.
-//
-
-
-#import <Cocoa/Cocoa.h>
-@class Person;
-
-@interface MyDocument : NSDocument
-{
- NSMutableArray *employees;
-}
-#pragma mark Accessors - 'employee'
-
-- (void)setEmployees:(NSMutableArray *)array;
-- (void)insertObject:(Person *)p
- inEmployeesAtIndex:(int)r;
-- (void)removeObjectFromEmployeesAtIndex:(int)r;
-
-@end
View
173 09_Undo/RaiseMan_A/MyDocument.m
@@ -1,173 +0,0 @@
-//
-// MyDocument.m
-// RaiseMan
-//
-// Created by Aaron Hillegass on 9/24/07.
-// Copyright __MyCompanyName__ 2007 . All rights reserved.
-//
-
-#import "MyDocument.h"
-#import "Person.h"
-
-@interface MyDocument ()
-
-- (void)startObservingPerson:(Person *)p;
-- (void)stopObservingPerson:(Person *)p;
-
-@end
-
-@implementation MyDocument
-
-- (id)init
-{
- if (![super init])
- return nil;
-
- [self setEmployees:[NSMutableArray array]];
-
- return self;
-}
-
-- (void)dealloc
-{
- [self setEmployees:nil];
- [super dealloc];
-}
-
-#pragma mark Accessors - 'employees'
-- (void)startObservingPerson:(Person *)person
-{
- [person addObserver:self
- forKeyPath:@"personName"
- options:NSKeyValueObservingOptionOld
- context:NULL];
-
- [person addObserver:self
- forKeyPath:@"expectedRaise"
- options:NSKeyValueObservingOptionOld
- context:NULL];
-}
-
-- (void)stopObservingPerson:(Person *)person
-{
- [person removeObserver:self
- forKeyPath:@"personName"];
-
- [person removeObserver:self
- forKeyPath:@"expectedRaise"];
-}
-
-
-- (void)insertObject:(Person *)p
- inEmployeesAtIndex:(int)r
-{
- // Register the undo
- NSUndoManager *undo = [self undoManager];
- [[undo prepareWithInvocationTarget:self]
- removeObjectFromEmployeesAtIndex:r];
- if (![undo isUndoing]) {
- [undo setActionName:@"Insert Person"];
- }
- // Add the person to the array
- [self startObservingPerson:p];
- [employees insertObject:p atIndex:r];
-}
-- (void)removeObjectFromEmployeesAtIndex:(int)r
-{
- Person *p = [employees objectAtIndex:r];
-
- NSUndoManager *undo = [self undoManager];
- [[undo prepareWithInvocationTarget:self]
- insertObject:p inEmployeesAtIndex:r];
- if (![undo isUndoing]) {
- [undo setActionName:@"Delete Person"];
- }
- [self stopObservingPerson:p];
- [employees removeObjectAtIndex:r];
-}
-
-- (void)setEmployees:(NSMutableArray *)array
-{
- if (array == employees) {
- return;
- }
- for (Person *p in employees) {
- [self stopObservingPerson:p];
- }
- [employees release];
- [array retain];
- employees = array;
- for (Person *p in employees) {
- [self startObservingPerson:p];
- }
-}
-
-- (void)changeKeyPath:(NSString *)keyPath
- ofObject:(id)obj
- toValue:(id)newValue
-{
- [obj setValue:newValue forKeyPath:keyPath];
-}
-
-- (void)observeValueForKeyPath:(NSString *)keyPath
- ofObject:(id)obj
- change:(NSDictionary *)change
- context:(void *)context
-{
- NSUndoManager *undo = [self undoManager];
- id oldValue = [change objectForKey:NSKeyValueChangeOldKey];
- if (oldValue == [NSNull null]) {
- oldValue = nil;
- }
- NSLog(@"oldValue = %@", oldValue);
- [[undo prepareWithInvocationTarget:self]
- changeKeyPath:keyPath
- ofObject:obj
- toValue:oldValue];
- [undo setActionName:@"Edit"];
-}
-
-#pragma mark NSDocument methods
-
-- (NSString *)windowNibName
-{
- // Override returning the nib file name of the document
- // If you need to use a subclass of NSWindowController or if your document supports multiple NSWindowControllers, you should remove this method and override -makeWindowControllers instead.
- return @"MyDocument";
-}
-
-- (void)windowControllerDidLoadNib:(NSWindowController *) aController
-{
- [super windowControllerDidLoadNib:aController];
- // Add any code here that needs to be executed once the windowController has loaded the document's window.
-}
-
-- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError
-{
- // Insert code here to write your document to data of the specified type. If the given outError != NULL, ensure that you set *outError when returning nil.
-
- // You can also choose to override -fileWrapperOfType:error:, -writeToURL:ofType:error:, or -writeToURL:ofType:forSaveOperation:originalContentsURL:error: instead.
-
- // For applications targeted for Panther or earlier systems, you should use the deprecated API -dataRepresentationOfType:. In this case you can also choose to override -fileWrapperRepresentationOfType: or -writeToFile:ofType: instead.
-
- if ( outError != NULL ) {
- *outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:NULL];
- }
- return nil;
-}
-
-- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError
-{
- // Insert code here to read your document from the given data of the specified type. If the given outError != NULL, ensure that you set *outError when returning NO.
-
- // You can also choose to override -readFromFileWrapper:ofType:error: or -readFromURL:ofType:error: instead.
-
- // For applications targeted for Panther or earlier systems, you should use the deprecated API -loadDataRepresentation:ofType. In this case you can also choose to override -readFromFile:ofType: or -loadFileWrapperRepresentation:ofType: instead.
-
- if ( outError != NULL ) {
- *outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:NULL];
- }
- return YES;
-}
-
-@end
View
19 09_Undo/RaiseMan_A/Person.h
@@ -1,19 +0,0 @@
-//
-// Person.h
-// RaiseMan
-//
-// Created by Aaron Hillegass on 9/24/07.
-// Copyright 2007 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-
-@interface Person : NSObject {
- NSString *personName;
- float expectedRaise;
-}
-@property (readwrite, copy) NSString *personName;
-@property (readwrite) float expectedRaise;
-
-@end
View
32 09_Undo/RaiseMan_A/Person.m
@@ -1,32 +0,0 @@
-//
-// Person.m
-// RaiseMan
-//
-// Created by Aaron Hillegass on 9/24/07.
-// Copyright 2007 __MyCompanyName__. All rights reserved.
-//
-
-#import "Person.h"
-
-
-@implementation Person
-
-@synthesize expectedRaise;
-@synthesize personName;
-
-- (id)init
-{
- [super init];
- expectedRaise = 5.0;
- personName = @"New Person";
- return self;
-}
-
-- (void)dealloc
-{
- [personName release];
- [super dealloc];
-}
-
-@end
-
View
20 09_Undo/RaiseMan_A/RaiseMan.xcodeproj/project.pbxproj
@@ -11,10 +11,8 @@
8D15AC2D0486D014006FF6A4 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B6FDCFA73011CA2CEA /* MainMenu.nib */; };
8D15AC2E0486D014006FF6A4 /* MyDocument.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B4FDCFA73011CA2CEA /* MyDocument.nib */; };
8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165FFE840EACC02AAC07 /* InfoPlist.strings */; };
- 8D15AC310486D014006FF6A4 /* MyDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */; settings = {ATTRIBUTES = (); }; };
8D15AC320486D014006FF6A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; };
- 9379BB510CA8616B006830B4 /* Person.m in Sources */ = {isa = PBXBuildFile; fileRef = 9379BB500CA8616B006830B4 /* Person.m */; };
AB0670A50DED05BE00E0ABDA /* Nu.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB0670A40DED05BE00E0ABDA /* Nu.framework */; };
AB0670A70DED05E400E0ABDA /* main.nu in Resources */ = {isa = PBXBuildFile; fileRef = AB0670A60DED05E400E0ABDA /* main.nu */; };
/* End PBXBuildFile section */
@@ -23,8 +21,6 @@
089C1660FE840EACC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
13E42FBA07B3F13500E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
- 2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyDocument.m; sourceTree = "<group>"; };
- 2A37F4AEFDCFA73011CA2CEA /* MyDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyDocument.h; sourceTree = "<group>"; };
2A37F4B0FDCFA73011CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
2A37F4B5FDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MyDocument.nib; sourceTree = "<group>"; };
2A37F4B7FDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
@@ -34,8 +30,6 @@
32DBCF750370BD2300C91783 /* RaiseMan_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RaiseMan_Prefix.pch; sourceTree = "<group>"; };
8D15AC360486D014006FF6A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8D15AC370486D014006FF6A4 /* RaiseMan.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RaiseMan.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 9379BB4F0CA8616B006830B4 /* Person.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Person.h; sourceTree = "<group>"; };
- 9379BB500CA8616B006830B4 /* Person.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Person.m; sourceTree = "<group>"; };
AB0670A40DED05BE00E0ABDA /* Nu.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nu.framework; path = /Library/Frameworks/Nu.framework; sourceTree = "<absolute>"; };
AB0670A60DED05E400E0ABDA /* main.nu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.nu; path = nu/main.nu; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -83,7 +77,6 @@
isa = PBXGroup;
children = (
AB0670A30DED05A900E0ABDA /* Nu */,
- 2A37F4ABFDCFA73011CA2CEA /* Classes */,
2A37F4AFFDCFA73011CA2CEA /* Other Sources */,
2A37F4B8FDCFA73011CA2CEA /* Resources */,
2A37F4C3FDCFA73011CA2CEA /* Frameworks */,
@@ -92,17 +85,6 @@
name = RaiseMan;
sourceTree = "<group>";
};
- 2A37F4ABFDCFA73011CA2CEA /* Classes */ = {
- isa = PBXGroup;
- children = (
- 9379BB4F0CA8616B006830B4 /* Person.h */,
- 9379BB500CA8616B006830B4 /* Person.m */,
- 2A37F4AEFDCFA73011CA2CEA /* MyDocument.h */,
- 2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */,
- );
- name = Classes;
- sourceTree = "<group>";
- };
2A37F4AFFDCFA73011CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
@@ -200,9 +182,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 8D15AC310486D014006FF6A4 /* MyDocument.m in Sources */,
8D15AC320486D014006FF6A4 /* main.m in Sources */,
- 9379BB510CA8616B006830B4 /* Person.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
72 09_Undo/RaiseMan_A/nu/main.nu
@@ -1,17 +1,57 @@
(import Cocoa) ;; bridgesupport
(load "console") ;; interactive console
-(class MyDocument
- (ivar (id) employees)
+(class Person is NSObject
+ (ivar (id) personName (float) expectedRaise)
+ (ivar-accessors)
+
+ (- (id) init is
+ (super init)
+ (set @expectedRaise 5.0)
+ (set @personName "New Person")
+ self)
+
+ (- (void) setNilValueForKey: (id) key is
+ (if (key isEqual:"expectedRaise")
+ (self setExpectedRaise:0.0)
+ (else (super setNilValueForKey:key)))))
+
+(class MyDocument is NSDocument
+ (ivar (id) employees (id) employeeController (id) tableView)
(- (id) init is
- (NSLog "init")
(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
- (NSLog "startObservingPerson: #{person}")
(person addObserver:self
forKeyPath:"personName"
options:NSKeyValueObservingOptionOld
@@ -22,12 +62,10 @@
context:nil))
(- (void) stopObservingPerson: (id) person is
- (NSLog "stopObservingPerson: #{person}")
(person removeObserver:self forKeyPath:"personName")
(person removeObserver:self forKeyPath:"expectedRaise"))
(- (void) insertObject: (id) p inEmployeesAtIndex: (int) r is
- (NSLog "InsertObject: #{p} inEmployeesAtIndex: #{r}")
;; Register the undo
(set undo (self undoManager))
((undo prepareWithInvocationTarget:self)
@@ -39,7 +77,6 @@
(@employees insertObject:p atIndex:r))
(- (void) removeObjectFromEmployeesAtIndex: (int) r is
- (NSLog "removeObjectFromEmployeesAtIndex: #{r}")
(set p (@employees r))
(set undo (self undoManager))
((undo prepareWithInvocationTarget:self)
@@ -50,17 +87,30 @@
(@employees removeObjectAtIndex:r))
(- (void) setEmployees: (id) arr is
- (NSLog "setEmployees: #{arr}")
(@employees each:(do (p) (self stopObservingPerson:p)))
(set @employees arr)
(@employees each:(do (p) (self startObservingPerson:p))))
(- (void) changeKeyPath: (id) keyPath ofObject: (id) obj toValue:(id) newValue is
(obj setValue:newValue forKeyPath:keyPath))
-
- )
-
+
+ (- (void) observeValueForKeyPath: (id) keyPath ofObject: (id) obj
+ change: (id) change context: (id) context is
+ (set undo (self undoManager))
+ (set oldValue (change objectForKey:NSKeyValueChangeOldKey))
+ (if (eq oldValue (NSNull null))
+ (set oldValue nil))
+ (NSLog "oldValue = #{oldValue}")
+ ((undo prepareWithInvocationTarget:self)
+ changeKeyPath:keyPath ofObject:obj toValue:oldValue)
+ (undo setActionName:"Edit"))
+ (- (id) windowNibName is "MyDocument")
+
+ (- (void) windowControllerDidLoadNib: (id) aController is
+ (super windowControllerDidLoadNib:aController)
+ ;; Add any code here that needs to be executed once the windowController has loaded the document's window.
+ ))
(set SHOW_CONSOLE_AT_STARTUP nil)
View
29 09_Undo/RaiseMan_B/English.lproj/Credits.rtf
@@ -0,0 +1,29 @@
+{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\paperw9840\paperh8400
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f0\b\fs24 \cf0 Engineering:
+\b0 \
+ Some people\
+\
+
+\b Human Interface Design:
+\b0 \
+ Some other people\
+\
+
+\b Testing:
+\b0 \
+ Hopefully not nobody\
+\
+
+\b Documentation:
+\b0 \
+ Whoever\
+\
+
+\b With special thanks to:
+\b0 \
+ Mom\
+}
View
BIN  09_Undo/RaiseMan_B/English.lproj/InfoPlist.strings
Binary file not shown
View
2,344 09_Undo/RaiseMan_B/English.lproj/MainMenu.nib/designable.nib
2,344 additions, 0 deletions not shown
View
BIN  09_Undo/RaiseMan_B/English.lproj/MainMenu.nib/keyedobjects.nib
Binary file not shown
View
842 09_Undo/RaiseMan_B/English.lproj/MyDocument.nib/designable.nib
@@ -0,0 +1,842 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
+ <data>
+ <int key="IBDocument.SystemTarget">1050</int>
+ <string key="IBDocument.SystemVersion">9D34</string>
+ <string key="IBDocument.InterfaceBuilderVersion">667</string>
+ <string key="IBDocument.AppKitVersion">949.33</string>
+ <string key="IBDocument.HIToolboxVersion">352.00</string>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="100027"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="580458321">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomObject" id="512844837">
+ <string key="NSClassName">MyDocument</string>
+ </object>
+ <object class="NSCustomObject" id="613418571">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSWindowTemplate" id="275939982">
+ <int key="NSWindowStyleMask">15</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{167, 472}, {578, 252}}</string>
+ <int key="NSWTFlags">1886912512</int>
+ <string key="NSWindowTitle">Window</string>
+ <string key="NSWindowClass">NSWindow</string>
+ <string key="NSViewClass">View</string>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+ <string key="NSWindowContentMinSize">{94, 86}</string>
+ <object class="NSView" key="NSWindowView" id="568628114">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSScrollView" id="1002163944">
+ <reference key="NSNextResponder" ref="568628114"/>
+ <int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSClipView" id="592377127">
+ <reference key="NSNextResponder" ref="1002163944"/>
+ <int key="NSvFlags">2304</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSTableView" id="291026330">
+ <reference key="NSNextResponder" ref="592377127"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrameSize">{341, 179}</string>
+ <reference key="NSSuperview" ref="592377127"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTableHeaderView" key="NSHeaderView" id="819324822">
+ <reference key="NSNextResponder" ref="756022370"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrameSize">{341, 17}</string>
+ <reference key="NSSuperview" ref="756022370"/>
+ <reference key="NSTableView" ref="291026330"/>
+ </object>
+ <object class="_NSCornerView" key="NSCornerView" id="1070650783">
+ <reference key="NSNextResponder" ref="1002163944"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{342, 0}, {16, 17}}</string>
+ <reference key="NSSuperview" ref="1002163944"/>
+ </object>
+ <object class="NSMutableArray" key="NSTableColumns">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSTableColumn" id="612509286">
+ <double key="NSWidth">2.340000e+02</double>
+ <double key="NSMinWidth">4.000000e+01</double>
+ <double key="NSMaxWidth">1.000000e+03</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628032</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Name</string>
+ <object class="NSFont" key="NSSupport" id="26">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">1.100000e+01</double>
+ <int key="NSfFlags">3100</int>
+ </object>
+ <object class="NSColor" key="NSBackgroundColor" id="939194537">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes>
+ </object>
+ <object class="NSColor" key="NSTextColor" id="906221815">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">headerTextColor</string>
+ <object class="NSColor" key="NSColor" id="890926189">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ </object>
+ </object>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="740447350">
+ <int key="NSCellFlags">337772096</int>
+ <int key="NSCellFlags2">2048</int>
+ <string key="NSContents">Text Cell</string>
+ <object class="NSFont" key="NSSupport" id="797198186">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">1.300000e+01</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <reference key="NSControlView" ref="291026330"/>
+ <object class="NSColor" key="NSBackgroundColor" id="416249555">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlBackgroundColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+ </object>
+ </object>
+ <object class="NSColor" key="NSTextColor" id="321165931">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlTextColor</string>
+ <reference key="NSColor" ref="890926189"/>
+ </object>
+ </object>
+ <int key="NSResizingMask">3</int>
+ <bool key="NSIsResizeable">YES</bool>
+ <bool key="NSIsEditable">YES</bool>
+ <reference key="NSTableView" ref="291026330"/>
+ <object class="NSSortDescriptor" key="NSSortDescriptorPrototype">
+ <string key="NSKey">personName</string>
+ <bool key="NSAscending">YES</bool>
+ <string key="NSSelector">caseInsensitiveCompare:</string>
+ </object>
+ </object>
+ <object class="NSTableColumn" id="818537613">
+ <double key="NSWidth">1.010000e+02</double>
+ <double key="NSMinWidth">4.000000e+01</double>
+ <double key="NSMaxWidth">1.000000e+03</double>
+ <object class="NSTableHeaderCell" key="NSHeaderCell">
+ <int key="NSCellFlags">75628032</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Raise</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSBackgroundColor" ref="939194537"/>
+ <reference key="NSTextColor" ref="906221815"/>
+ </object>
+ <object class="NSTextFieldCell" key="NSDataCell" id="592784498">
+ <int key="NSCellFlags">337772096</int>
+ <int key="NSCellFlags2">2048</int>
+ <real value="1.234568e+02" key="NSContents"/>
+ <reference key="NSSupport" ref="797198186"/>
+ <object class="NSNumberFormatter" key="NSFormatter" id="360458390">
+ <object class="NSMutableDictionary" key="NS.attributes">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>allowsFloats</string>
+ <string>alwaysShowsDecimalSeparator</string>
+ <string>attributedStringForZero</string>
+ <string>decimalSeparator</string>
+ <string>formatWidth</string>
+ <string>formatterBehavior</string>
+ <string>generatesDecimalNumbers</string>
+ <string>groupingSeparator</string>
+ <string>multiplier</string>
+ <string>negativeFormat</string>
+ <string>numberStyle</string>
+ <string>paddingCharacter</string>
+ <string>paddingPosition</string>
+ <string>positiveFormat</string>
+ <string>usesGroupingSeparator</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="1" id="9"/>
+ <integer value="0" id="8"/>
+ <object class="NSAttributedString" id="584921952">
+ <string key="NSString">0.00%</string>
+ <object class="NSDictionary" key="NSAttributes" id="859387701">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ </object>
+ <string>.</string>
+ <reference ref="8"/>
+ <integer value="1000"/>
+ <reference ref="8"/>
+ <string>,</string>
+ <reference ref="9"/>
+ <string>-0.00%</string>
+ <integer value="3"/>
+ <string/>
+ <integer value="2"/>
+ <string>0.00%</string>
+ <integer value="0"/>
+ </object>
+ </object>
+ <string key="NS.positiveformat">0.00%</string>
+ <string key="NS.negativeformat">-0.00%</string>
+ <nil key="NS.positiveattrs"/>
+ <nil key="NS.negativeattrs"/>
+ <reference key="NS.zero" ref="584921952"/>
+ <object class="NSAttributedString" key="NS.nil">
+ <string key="NSString"/>
+ </object>
+ <object class="NSAttributedString" key="NS.nan">
+ <string key="NSString">NaN</string>
+ <reference key="NSAttributes" ref="859387701"/>
+ </object>
+ <object class="NSDecimalNumberPlaceholder" key="NS.min" id="124539708">
+ <int key="NS.exponent">0</int>
+ <int key="NS.length">0</int>
+ <bool key="NS.negative">YES</bool>
+ <bool key="NS.compact">NO</bool>
+ <int key="NS.mantissa.bo">1</int>
+ <bytes key="NS.mantissa">AAAAAAAAAAAAAAAAAAAAAA</bytes>
+ </object>
+ <reference key="NS.max" ref="124539708"/>
+ <nil key="NS.rounding"/>
+ <string key="NS.decimal">.</string>
+ <string key="NS.thousand">,</string>
+ <bool key="NS.hasthousands">NO</bool>
+ <bool key="NS.localized">YES</bool>
+ <bool key="NS.allowsfloats">YES</bool>
+ </object>
+ <reference key="NSControlView" ref="291026330"/>
+ <reference key="NSBackgroundColor" ref="416249555"/>
+ <reference key="NSTextColor" ref="321165931"/>
+ </object>
+ <int key="NSResizingMask">3</int>
+ <bool key="NSIsResizeable">YES</bool>
+ <bool key="NSIsEditable">YES</bool>
+ <reference key="NSTableView" ref="291026330"/>
+ </object>
+ </object>
+ <double key="NSIntercellSpacingWidth">3.000000e+00</double>
+ <double key="NSIntercellSpacingHeight">2.000000e+00</double>
+ <object class="NSColor" key="NSBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <object class="NSColor" key="NSGridColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">gridColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ </object>
+ <double key="NSRowHeight">1.700000e+01</double>
+ <int key="NSTvFlags">-700448768</int>
+ <int key="NSColumnAutoresizingStyle">4</int>
+ <int key="NSDraggingSourceMaskForLocal">15</int>
+ <int key="NSDraggingSourceMaskForNonLocal">0</int>
+ <bool key="NSAllowsTypeSelect">YES</bool>
+ </object>
+ </object>
+ <string key="NSFrame">{{1, 17}, {341, 179}}</string>
+ <reference key="NSSuperview" ref="1002163944"/>
+ <reference key="NSNextKeyView" ref="291026330"/>
+ <reference key="NSDocView" ref="291026330"/>
+ <reference key="NSBGColor" ref="416249555"/>
+ <int key="NScvFlags">4</int>
+ </object>
+ <object class="NSScroller" id="889587563">
+ <reference key="NSNextResponder" ref="1002163944"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{342, 17}, {15, 179}}</string>
+ <reference key="NSSuperview" ref="1002163944"/>
+ <reference key="NSTarget" ref="1002163944"/>
+ <string key="NSAction">_doScroller:</string>
+ <double key="NSCurValue">9.944134e-01</double>
+ <double key="NSPercent">1.947368e-01</double>
+ </object>
+ <object class="NSScroller" id="643461666">
+ <reference key="NSNextResponder" ref="1002163944"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{1, 196}, {341, 15}}</string>
+ <reference key="NSSuperview" ref="1002163944"/>
+ <int key="NSsFlags">1</int>
+ <reference key="NSTarget" ref="1002163944"/>
+ <string key="NSAction">_doScroller:</string>
+ <double key="NSPercent">3.000000e-01</double>
+ </object>
+ <object class="NSClipView" id="756022370">
+ <reference key="NSNextResponder" ref="1002163944"/>
+ <int key="NSvFlags">2304</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="819324822"/>
+ </object>
+ <string key="NSFrame">{{1, 0}, {341, 17}}</string>
+ <reference key="NSSuperview" ref="1002163944"/>
+ <reference key="NSNextKeyView" ref="819324822"/>
+ <reference key="NSDocView" ref="819324822"/>
+ <reference key="NSBGColor" ref="416249555"/>
+ <int key="NScvFlags">4</int>
+ </object>
+ <reference ref="1070650783"/>
+ </object>
+ <string key="NSFrame">{{20, 25}, {358, 212}}</string>
+ <reference key="NSSuperview" ref="568628114"/>
+ <reference key="NSNextKeyView" ref="592377127"/>
+ <int key="NSsFlags">50</int>
+ <reference key="NSVScroller" ref="889587563"/>
+ <reference key="NSHScroller" ref="643461666"/>
+ <reference key="NSContentView" ref="592377127"/>
+ <reference key="NSHeaderClipView" ref="756022370"/>
+ <reference key="NSCornerView" ref="1070650783"/>
+ <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
+ </object>
+ <object class="NSButton" id="58104069">
+ <reference key="NSNextResponder" ref="568628114"/>
+ <int key="NSvFlags">265</int>
+ <string key="NSFrame">{{395, 210}, {163, 23}}</string>
+ <reference key="NSSuperview" ref="568628114"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="310167191">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents">Add New Employee</string>
+ <reference key="NSSupport" ref="797198186"/>
+ <reference key="NSControlView" ref="58104069"/>
+ <int key="NSButtonFlags">-2033434369</int>
+ <int key="NSButtonFlags2">162</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
+ <object class="NSButton" id="842654444">
+ <reference key="NSNextResponder" ref="568628114"/>
+ <int key="NSvFlags">265</int>
+ <string key="NSFrame">{{397, 181}, {163, 23}}</string>
+ <reference key="NSSuperview" ref="568628114"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="650887567">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents">Delete</string>
+ <reference key="NSSupport" ref="797198186"/>
+ <reference key="NSControlView" ref="842654444"/>
+ <int key="NSButtonFlags">-2033434369</int>
+ <int key="NSButtonFlags2">162</int>
+ <string key="NSAlternateContents"/>
+ <string type="base64-UTF8" key="NSKeyEquivalent">fw</string>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrameSize">{578, 252}</string>
+ <reference key="NSSuperview"/>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1680, 1027}}</string>
+ <string key="NSMinSize">{94, 108}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+ </object>
+ <object class="NSCustomObject" id="796877042">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSArrayController" id="399851706">
+ <object class="NSMutableArray" key="NSDeclaredKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>personName</string>
+ <string>expectedRaise</string>
+ </object>
+ <string key="NSObjectClassName">Person</string>
+ <bool key="NSEditable">YES</bool>
+ <object class="_NSManagedProxy" key="_NSManagedProxy"/>
+ <bool key="NSAvoidsEmptySelection">YES</bool>
+ <bool key="NSPreservesSelection">YES</bool>
+ <bool key="NSSelectsInsertedObjects">YES</bool>
+ <bool key="NSFilterRestrictsInsertion">YES</bool>
+ <bool key="NSClearsFilterPredicateOnInsertion">YES</bool>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="275939982"/>
+ <reference key="destination" ref="512844837"/>
+ </object>
+ <int key="connectionID">17</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="512844837"/>
+ <reference key="destination" ref="275939982"/>
+ </object>
+ <int key="connectionID">18</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">contentArray: employees</string>
+ <reference key="source" ref="399851706"/>
+ <reference key="destination" ref="512844837"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="399851706"/>
+ <reference key="NSDestination" ref="512844837"/>
+ <string key="NSLabel">contentArray: employees</string>
+ <string key="NSBinding">contentArray</string>
+ <string key="NSKeyPath">employees</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">100035</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: arrangedObjects.personName</string>
+ <reference key="source" ref="612509286"/>
+ <reference key="destination" ref="399851706"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="612509286"/>
+ <reference key="NSDestination" ref="399851706"/>
+ <string key="NSLabel">value: arrangedObjects.personName</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">arrangedObjects.personName</string>
+ <object class="NSDictionary" key="NSOptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSAllowsEditingMultipleValuesSelection</string>
+ <string>NSAlwaysPresentsApplicationModalAlerts</string>
+ <string>NSConditionallySetsEditable</string>
+ <string>NSConditionallySetsEnabled</string>
+ <string>NSContinuouslyUpdatesValue</string>
+ <string>NSCreatesSortDescriptor</string>
+ <string>NSMultipleValuesPlaceholder</string>
+ <string>NSNoSelectionPlaceholder</string>
+ <string>NSNotApplicablePlaceholder</string>
+ <string>NSNullPlaceholder</string>
+ <string>NSRaisesForNotApplicableKeys</string>
+ <string>NSValidatesImmediately</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="9"/>
+ <reference ref="8"/>
+ <reference ref="9"/>
+ <reference ref="8"/>
+ <reference ref="8"/>
+ <reference ref="9"/>
+ <string/>
+ <string/>
+ <string/>
+ <string/>
+ <reference ref="9"/>
+ <reference ref="9"/>
+ </object>
+ </object>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">100036</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: arrangedObjects.expectedRaise</string>
+ <reference key="source" ref="818537613"/>
+ <reference key="destination" ref="399851706"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="818537613"/>
+ <reference key="NSDestination" ref="399851706"/>
+ <string key="NSLabel">value: arrangedObjects.expectedRaise</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">arrangedObjects.expectedRaise</string>
+ <object class="NSDictionary" key="NSOptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSAllowsEditingMultipleValuesSelection</string>
+ <string>NSAlwaysPresentsApplicationModalAlerts</string>
+ <string>NSConditionallySetsEditable</string>
+ <string>NSConditionallySetsEnabled</string>
+ <string>NSContinuouslyUpdatesValue</string>
+ <string>NSCreatesSortDescriptor</string>
+ <string>NSMultipleValuesPlaceholder</string>
+ <string>NSNoSelectionPlaceholder</string>
+ <string>NSNotApplicablePlaceholder</string>
+ <string>NSNullPlaceholder</string>
+ <string>NSRaisesForNotApplicableKeys</string>
+ <string>NSValidatesImmediately</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="9"/>
+ <reference ref="8"/>
+ <reference ref="9"/>
+ <reference ref="8"/>
+ <reference ref="8"/>
+ <reference ref="9"/>
+ <string/>
+ <string/>
+ <string/>
+ <string/>
+ <reference ref="8"/>
+ <reference ref="8"/>
+ </object>
+ </object>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">100037</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">remove:</string>
+ <reference key="source" ref="399851706"/>
+ <reference key="destination" ref="842654444"/>
+ </object>
+ <int key="connectionID">100040</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">enabled: canRemove</string>
+ <reference key="source" ref="842654444"/>
+ <reference key="destination" ref="399851706"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="842654444"/>
+ <reference key="NSDestination" ref="399851706"/>
+ <string key="NSLabel">enabled: canRemove</string>
+ <string key="NSBinding">enabled</string>
+ <string key="NSKeyPath">canRemove</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">100041</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">tableView</string>
+ <reference key="source" ref="512844837"/>
+ <reference key="destination" ref="291026330"/>
+ </object>
+ <int key="connectionID">100042</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">employeeController</string>
+ <reference key="source" ref="512844837"/>
+ <reference key="destination" ref="399851706"/>
+ </object>
+ <int key="connectionID">100044</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">createEmployee:</string>
+ <reference key="source" ref="512844837"/>
+ <reference key="destination" ref="58104069"/>
+ </object>
+ <int key="connectionID">100045</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>
+ <object class="NSArray" key="object" id="595877537">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="children" ref="580458321"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="512844837"/>
+ <reference key="parent" ref="595877537"/>
+ <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="613418571"/>
+ <reference key="parent" ref="595877537"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">5</int>
+ <reference key="object" ref="275939982"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="568628114"/>
+ </object>
+ <reference key="parent" ref="595877537"/>
+ <string key="objectName">Window</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="568628114"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1002163944"/>
+ <reference ref="58104069"/>
+ <reference ref="842654444"/>
+ </object>
+ <reference key="parent" ref="275939982"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="796877042"/>
+ <reference key="parent" ref="595877537"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100021</int>
+ <reference key="object" ref="1002163944"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="889587563"/>
+ <reference ref="643461666"/>
+ <reference ref="291026330"/>
+ <reference ref="819324822"/>
+ </object>
+ <reference key="parent" ref="568628114"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100022</int>
+ <reference key="object" ref="889587563"/>
+ <reference key="parent" ref="1002163944"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100023</int>
+ <reference key="object" ref="643461666"/>
+ <reference key="parent" ref="1002163944"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100024</int>
+ <reference key="object" ref="291026330"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="612509286"/>
+ <reference ref="818537613"/>
+ </object>
+ <reference key="parent" ref="1002163944"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100025</int>
+ <reference key="object" ref="819324822"/>
+ <reference key="parent" ref="1002163944"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100026</int>
+ <reference key="object" ref="612509286"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="740447350"/>
+ </object>
+ <reference key="parent" ref="291026330"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100027</int>
+ <reference key="object" ref="818537613"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="592784498"/>
+ </object>
+ <reference key="parent" ref="291026330"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100028</int>
+ <reference key="object" ref="592784498"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="360458390"/>
+ </object>
+ <reference key="parent" ref="818537613"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100029</int>
+ <reference key="object" ref="740447350"/>
+ <reference key="parent" ref="612509286"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100030</int>
+ <reference key="object" ref="58104069"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="310167191"/>
+ </object>
+ <reference key="parent" ref="568628114"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100031</int>
+ <reference key="object" ref="310167191"/>
+ <reference key="parent" ref="58104069"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100032</int>
+ <reference key="object" ref="842654444"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="650887567"/>
+ </object>
+ <reference key="parent" ref="568628114"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100033</int>
+ <reference key="object" ref="650887567"/>
+ <reference key="parent" ref="842654444"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100034</int>
+ <reference key="object" ref="399851706"/>
+ <reference key="parent" ref="595877537"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">100038</int>
+ <reference key="object" ref="360458390"/>
+ <reference key="parent" ref="592784498"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.IBPluginDependency</string>
+ <string>-2.IBPluginDependency</string>
+ <string>100021.IBPluginDependency</string>
+ <string>100022.IBPluginDependency</string>
+ <string>100023.IBPluginDependency</string>
+ <string>100024.IBPluginDependency</string>
+ <string>100025.IBPluginDependency</string>
+ <string>100026.IBPluginDependency</string>
+ <string>100027.IBPluginDependency</string>
+ <string>100028.IBPluginDependency</string>
+ <string>100029.IBPluginDependency</string>
+ <string>100030.IBPluginDependency</string>
+ <string>100031.IBPluginDependency</string>
+ <string>100032.IBPluginDependency</string>
+ <string>100033.IBPluginDependency</string>
+ <string>100034.IBPluginDependency</string>
+ <string>100038.IBPluginDependency</string>
+ <string>5.IBEditorWindowLastContentRect</string>
+ <string>5.IBPluginDependency</string>
+ <string>5.IBWindowTemplateEditedContentRect</string>
+ <string>5.ImportedFromIB2</string>
+ <string>5.editorWindowContentRectSynchronizationRect</string>
+ <string>5.windowTemplate.hasMinSize</string>
+ <string>5.windowTemplate.minSize</string>
+ <string>6.IBPluginDependency</string>
+ <string>6.ImportedFromIB2</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{0, 893}, {578, 252}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{0, 893}, {578, 252}}</string>
+ <reference ref="9"/>
+ <string>{{98, 633}, {578, 252}}</string>
+ <reference ref="9"/>
+ <string>{94, 86}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <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>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">100045</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">MyDocument</string>
+ <string key="superclassName">NSDocument</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">createEmployee:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>employeeController</string>
+ <string>tableView</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSArrayController</string>
+ <string>NSTableView</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">MyDocument.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../RaiseMan.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ </data>
+</archive>
View
BIN  09_Undo/RaiseMan_B/English.lproj/MyDocument.nib/keyedobjects.nib
Binary file not shown
View
49 09_Undo/RaiseMan_B/Info.plist
@@ -0,0 +1,49 @@
+<?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>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>????</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string></string>
+ <key>CFBundleTypeName</key>
+ <string>DocumentType</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>????</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>NSDocumentClass</key>
+ <string>MyDocument</string>
+ </dict>
+ </array>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.RaiseMan</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>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
View
307 09_Undo/RaiseMan_B/RaiseMan.xcodeproj/project.pbxproj
@@ -0,0 +1,307 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 44;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 8D15AC2C0486D014006FF6A4 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */; };
+ 8D15AC2D0486D014006FF6A4 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B6FDCFA73011CA2CEA /* MainMenu.nib */; };
+ 8D15AC2E0486D014006FF6A4 /* MyDocument.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B4FDCFA73011CA2CEA /* MyDocument.nib */; };
+ 8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165FFE840EACC02AAC07 /* InfoPlist.strings */; };
+ 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 */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 089C1660FE840EACC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 13E42FBA07B3F13500E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
+ 2A37F4B0FDCFA73011CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 2A37F4B5FDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MyDocument.nib; sourceTree = "<group>"; };
+ 2A37F4B7FDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
+ 2A37F4BAFDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = "<group>"; };
+ 2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+ 2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 32DBCF750370BD2300C91783 /* RaiseMan_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RaiseMan_Prefix.pch; sourceTree = "<group>"; };
+ 8D15AC360486D014006FF6A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 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 = "<absolute>"; };
+ AB1DE7500DF37490008275EC /* main.nu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.nu; path = ../RaiseMan_A/nu/main.nu; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8D15AC330486D014006FF6A4 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */,
+ AB1DE74D0DF37472008275EC /* Nu.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "<group>";
+ };
+ 1058C7A8FEA54F5311CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */,
+ 13E42FBA07B3F13500E4EEF1 /* CoreData.framework */,
+ 2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 19C28FB0FE9D524F11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D15AC370486D014006FF6A4 /* RaiseMan.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 2A37F4AAFDCFA73011CA2CEA /* RaiseMan */ = {
+ isa = PBXGroup;
+ children = (
+ AB1DE7480DF37461008275EC /* Nu */,
+ 2A37F4AFFDCFA73011CA2CEA /* Other Sources */,
+ 2A37F4B8FDCFA73011CA2CEA /* Resources */,
+ 2A37F4C3FDCFA73011CA2CEA /* Frameworks */,
+ 19C28FB0FE9D524F11CA2CBB /* Products */,
+ );
+ name = RaiseMan;
+ sourceTree = "<group>";
+ };
+ 2A37F4AFFDCFA73011CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 32DBCF750370BD2300C91783 /* RaiseMan_Prefix.pch */,
+ 2A37F4B0FDCFA73011CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 2A37F4B8FDCFA73011CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */,
+ 2A37F4B6FDCFA73011CA2CEA /* MainMenu.nib */,
+ 2A37F4B4FDCFA73011CA2CEA /* MyDocument.nib */,
+ 8D15AC360486D014006FF6A4 /* Info.plist */,
+ 089C165FFE840EACC02AAC07 /* InfoPlist.strings */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 2A37F4C3FDCFA73011CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ AB1DE74C0DF37472008275EC /* Nu.framework */,
+ 1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */,
+ 1058C7A8FEA54F5311CA2CBB /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ AB1DE7480DF37461008275EC /* Nu */ = {
+ isa = PBXGroup;
+ children = (
+ AB1DE7500DF37490008275EC /* main.nu */,
+ );
+ name = Nu;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8D15AC270486D014006FF6A4 /* RaiseMan */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C05733C708A9546B00998B17 /* Build configuration list for PBXNativeTarget "RaiseMan" */;
+ buildPhases = (
+ 8D15AC2B0486D014006FF6A4 /* Resources */,
+ 8D15AC300486D014006FF6A4 /* Sources */,
+ 8D15AC330486D014006FF6A4 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = RaiseMan;
+ productInstallPath = "$(HOME)/Applications";
+ productName = RaiseMan;
+ productReference = 8D15AC370486D014006FF6A4 /* RaiseMan.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 2A37F4A9FDCFA73011CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "RaiseMan" */;
+ compatibilityVersion = "Xcode 3.0";
+ hasScannedForEncodings = 1;
+ mainGroup = 2A37F4AAFDCFA73011CA2CEA /* RaiseMan */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8D15AC270486D014006FF6A4 /* RaiseMan */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D15AC2B0486D014006FF6A4 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D15AC2C0486D014006FF6A4 /* Credits.rtf in Resources */,
+ 8D15AC2D0486D014006FF6A4 /* MainMenu.nib in Resources */,
+ 8D15AC2E0486D014006FF6A4 /* MyDocument.nib in Resources */,
+ 8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */,
+ AB1DE7510DF37490008275EC /* main.nu in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8D15AC300486D014006FF6A4 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D15AC320486D014006FF6A4 /* main.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 089C165FFE840EACC02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C1660FE840EACC02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 2A37F4B4FDCFA73011CA2CEA /* MyDocument.nib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 2A37F4B5FDCFA73011CA2CEA /* English */,
+ );
+ name = MyDocument.nib;
+ sourceTree = "<group>";
+ };
+ 2A37F4B6FDCFA73011CA2CEA /* MainMenu.nib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 2A37F4B7FDCFA73011CA2CEA /* English */,
+ );
+ name = MainMenu.nib;
+ sourceTree = "<group>";
+ };
+ 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 2A37F4BAFDCFA73011CA2CEA /* English */,
+ );
+ name = Credits.rtf;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ C05733C808A9546B00998B17 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = RaiseMan_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = RaiseMan;
+ WRAPPER_EXTENSION = app;
+ ZERO_LINK = YES;
+ };
+ name = Debug;
+ };
+ C05733C908A9546B00998B17 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = RaiseMan_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = RaiseMan;
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+ C05733CC08A9546B00998B17 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ };
+ name = Debug;
+ };
+ C05733CD08A9546B00998B17 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ C05733C708A9546B00998B17 /* Build configuration list for PBXNativeTarget "RaiseMan" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C05733C808A9546B00998B17 /* Debug */,
+ C05733C908A9546B00998B17 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "RaiseMan" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C05733CC08A9546B00998B17 /* Debug */,
+ C05733CD08A9546B00998B17 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 2A37F4A9FDCFA73011CA2CEA /* Project object */;
+}
View
7 09_Undo/RaiseMan_B/RaiseMan_Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'RaiseMan' target in the 'RaiseMan' project
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
View
6 09_Undo/RaiseMan_B/main.m
@@ -0,0 +1,6 @@
+int NuMain(int argc, const char *argv[]);
+
+int main(int argc, const char *argv[])
+{
+ return NuMain(argc, argv);
+}
View
108 09_Undo/RaiseMan_B/nu/main.nu
@@ -0,0 +1,108 @@
+(import Cocoa) ;; bridgesupport
+(load "console") ;; interactive console
+
+(class Person is NSObject
+ (ivar (id) personName (float) expectedRaise)
+ (ivar-accessors)
+
+ (- (id) init is
+ (super init)
+ (set @expectedRaise 5.0)
+ (set @personName "New Person")
+ self)
+
+ (- (void) setNilValueForKey: (id) key is
+ (if (key isEqual:"expectedRaise")
+ (self setExpectedRaise:0.0)
+ (else (super setNilValueForKey:key)))))
+
+(class MyDocument is NSDocument
+ (ivar (id) employees)
+
+ (- (id) init is
+ (super init)
+ (self setEmployees:(array))
+ self)
+
+ (- (void) startObservingPerson: (id) person is
+ (person addObserver:self
+ forKeyPath:"personName"
+ options:NSKeyValueObservingOptionOld
+ context:nil)
+ (person addObserver:self
+ forKeyPath:"expectedRaise"
+ options:NSKeyValueObservingOptionOld
+ context:nil))
+
+ (- (void) stopObservingPerson: (id) person is
+ (person removeObserver:self forKeyPath:"personName")
+ (person removeObserver:self forKeyPath:"expectedRaise"))
+
+ (- (void) insertObject: (id) p inEmployeesAtIndex: (int) r is
+ ;; Register the undo
+ (set undo (self undoManager))
+ ((undo prepareWithInvocationTarget:self)
+ removeObjectFromEmployeesAtIndex:r)
+ (unless (undo isUndoing)
+ (undo setActionName:"Insert Person"))
+ ;; Add the person to the array
+ (self startObservingPerson:p)
+ (@employees insertObject:p atIndex:r))
+
+ (- (void) removeObjectFromEmployeesAtIndex: (int) r is
+ (set p (@employees r))
+ (set undo (self undoManager))
+ ((undo prepareWithInvocationTarget:self)
+ insertObject:p inEmployeesAtIndex:r)
+ (unless (undo isUndoing)
+ (undo setActionName:"Delete Person"))
+ (self stopObservingPerson:p)
+ (@employees removeObjectAtIndex:r))
+
+ (- (void) setEmployees: (id) arr is
+ (@employees each:(do (p) (self stopObservingPerson:p)))
+ (set @employees arr)
+ (@employees each:(do (p) (self startObservingPerson:p))))
+
+ (- (void) changeKeyPath: (id) keyPath ofObject: (id) obj toValue:(id) newValue is
+ (obj setValue:newValue forKeyPath:keyPath))
+
+ (- (void) observeValueForKeyPath: (id) keyPath ofObject: (id) obj
+ change: (id) change context: (id) context is
+ (set undo (self undoManager))
+ (set oldValue (change objectForKey:NSKeyValueChangeOldKey))
+ (if (eq oldValue (NSNull null))
+ (set oldValue nil))
+ (NSLog "oldValue = #{oldValue}")
+ ((undo prepareWithInvocationTarget:self)
+ changeKeyPath:keyPath ofObject:obj toValue:oldValue)
+ (undo setActionName:"Edit"))
+
+ (- (id) windowNibName is "MyDocument")
+
+ (- (void) windowControllerDidLoadNib: (id) aController is
+ (super windowControllerDidLoadNib:aController)
+ ;; Add any code here that needs to be executed once the windowController has loaded the document's window.
+ ))
+
+(set SHOW_CONSOLE_AT_STARTUP nil)
+
+;; @class ApplicationDelegate
+;; @discussion Methods of this class perform general-purpose tasks that are not appropriate methods of any other classes.
+(class ApplicationDelegate is NSObject
+
+ ;; This method is called after Cocoa has finished its basic application setup.
+ ;; It instantiates application-specific components.
+ ;; In this case, it constructs an interactive Nu console that can be activated from the application's Window menu.
+ (- (void) applicationDidFinishLaunching:(id) sender is
+ (set $console ((NuConsoleWindowController alloc) init))
+ (if SHOW_CONSOLE_AT_STARTUP ($console toggleConsole:self))))
+
+;; install the delegate and keep a reference to it since the application won't retain it.
+((NSApplication sharedApplication) setDelegate:(set $delegate ((ApplicationDelegate alloc) init)))
+
+;; this makes the application window take focus when we've started it from the terminal (or with nuke)
+((NSApplication sharedApplication) activateIgnoringOtherApps:YES)
+
+;; run the main Cocoa event loop
+(NSApplicationMain 0 nil)
Please sign in to comment.
Something went wrong with that request. Please try again.