Adding a category to NSProxy that fixes a bug so as to allow NSProxies to be
authorJoseph Spiros <joseph.spiros@ithinksw.com>
Sat, 26 Feb 2005 06:16:19 +0000 (06:16 +0000)
committerJoseph Spiros <joseph.spiros@ithinksw.com>
Sat, 26 Feb 2005 06:16:19 +0000 (06:16 +0000)
passed as arguments to NSLog without needing to explicitly call
-description outside of NSLog.

ITCategory-NSProxy.h [new file with mode: 0644]
ITCategory-NSProxy.m [new file with mode: 0644]
ITFoundation.xcode/project.pbxproj

diff --git a/ITCategory-NSProxy.h b/ITCategory-NSProxy.h
new file mode 100644 (file)
index 0000000..6848d14
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ *     ITFoundation
+ *     ITCategory-NSProxy.h
+ *
+ *     This is actually a bug fix, as _copyDescription is required by NSLog when
+ *             you supply an object other than a string as a parameter for building a
+ *             string, and yet NSProxy does not implement or proxy it.
+ *
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
+ *
+ */
+
+#import <Cocoa/Cocoa.h>
+
+@interface NSProxy (ITCategory)
+
+- (NSString *)_copyDescription;
+
+@end
diff --git a/ITCategory-NSProxy.m b/ITCategory-NSProxy.m
new file mode 100644 (file)
index 0000000..e4f73c4
--- /dev/null
@@ -0,0 +1,9 @@
+#import "ITCategory-NSProxy.h"
+
+@implementation NSProxy (ITCategory)
+
+- (NSString *)_copyDescription {
+       return [[self description] retain];
+}
+
+@end
index f32054d..64c152b 100755 (executable)
 //2A4
                2AB93A2C057059DC007E748F = {
                        children = (
+                               7CB02EB407D049BB00959EA0,
+                               7CB02EB507D049BB00959EA0,
                                7C2D93BD07C2FD6700A487A9,
                                7C2D93BE07C2FD6700A487A9,
                                7C058DF7072F10530082E1E9,
                                );
                        };
                };
+               7CB02EB407D049BB00959EA0 = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       path = "ITCategory-NSProxy.h";
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               7CB02EB507D049BB00959EA0 = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.objc;
+                       path = "ITCategory-NSProxy.m";
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               7CB02EB607D049BB00959EA0 = {
+                       fileRef = 7CB02EB407D049BB00959EA0;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Public,
+                               );
+                       };
+               };
+               7CB02EB707D049BB00959EA0 = {
+                       fileRef = 7CB02EB507D049BB00959EA0;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
                7CF6C92E057D65B0007FEC13 = {
                        fileEncoding = 4;
                        isa = PBXFileReference;
                                376AF4DF06597CA900F0979E,
                                7C058DF9072F10530082E1E9,
                                7C2D93BF07C2FD6700A487A9,
+                               7CB02EB607D049BB00959EA0,
                        );
                        isa = PBXHeadersBuildPhase;
                        runOnlyForDeploymentPostprocessing = 0;
                                376AF4E006597CA900F0979E,
                                7C058DFA072F10530082E1E9,
                                7C2D93C007C2FD6700A487A9,
+                               7CB02EB707D049BB00959EA0,
                        );
                        isa = PBXSourcesBuildPhase;
                        runOnlyForDeploymentPostprocessing = 0;