incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [2/2] git commit: Factored out NSDictionary+LowercaseKeys category to prevent duplicate symbol warning.
Date Wed, 18 Jan 2012 01:21:04 GMT
Factored out NSDictionary+LowercaseKeys category to prevent duplicate symbol warning.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/d68571fd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/d68571fd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/d68571fd

Branch: refs/heads/master
Commit: d68571fd1b9ce57ee664aa082b5de6b5078730b9
Parents: 3ae160d
Author: shazron <shazron@gmail.com>
Authored: Tue Jan 17 17:04:20 2012 -0800
Committer: shazron <shazron@gmail.com>
Committed: Tue Jan 17 17:04:20 2012 -0800

----------------------------------------------------------------------
 PhoneGapLib/Classes/NSDictionary+LowercaseKeys.h  |   14 +++++++++
 PhoneGapLib/Classes/NSDictionary+LowercaseKeys.m  |   25 ++++++++++++++++
 PhoneGapLib/Classes/PhoneGapDelegate.h            |    6 ----
 PhoneGapLib/Classes/PhoneGapDelegate.m            |    1 +
 PhoneGapLib/PhoneGapLib.xcodeproj/project.pbxproj |   12 +++++++
 5 files changed, 52 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/d68571fd/PhoneGapLib/Classes/NSDictionary+LowercaseKeys.h
----------------------------------------------------------------------
diff --git a/PhoneGapLib/Classes/NSDictionary+LowercaseKeys.h b/PhoneGapLib/Classes/NSDictionary+LowercaseKeys.h
new file mode 100644
index 0000000..77e648c
--- /dev/null
+++ b/PhoneGapLib/Classes/NSDictionary+LowercaseKeys.h
@@ -0,0 +1,14 @@
+//
+//  NSDictionary+LowercaseKeys.h
+//  PhoneGapLib
+//
+//  Created by Shazron Abdullah on 12-01-17.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface NSDictionary (LowercaseKeys)
+
+- (NSDictionary*) dictionaryWithLowercaseKeys;
+
+@end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/d68571fd/PhoneGapLib/Classes/NSDictionary+LowercaseKeys.m
----------------------------------------------------------------------
diff --git a/PhoneGapLib/Classes/NSDictionary+LowercaseKeys.m b/PhoneGapLib/Classes/NSDictionary+LowercaseKeys.m
new file mode 100644
index 0000000..f6bcc50
--- /dev/null
+++ b/PhoneGapLib/Classes/NSDictionary+LowercaseKeys.m
@@ -0,0 +1,25 @@
+//
+//  NSDictionary+LowercaseKeys.m
+//  PhoneGapLib
+//
+//  Created by Shazron Abdullah on 12-01-17.
+
+#import "NSDictionary+LowercaseKeys.h"
+
+#pragma mark -
+
+@implementation NSDictionary (LowercaseKeys)
+
+- (NSDictionary*) dictionaryWithLowercaseKeys 
+{
+    NSMutableDictionary* result = [NSMutableDictionary dictionaryWithCapacity:self.count];
+    NSString* key;
+    
+    for (key in self) {
+        [result setObject:[self objectForKey:key] forKey:[key lowercaseString]];
+    }
+    
+    return result;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/d68571fd/PhoneGapLib/Classes/PhoneGapDelegate.h
----------------------------------------------------------------------
diff --git a/PhoneGapLib/Classes/PhoneGapDelegate.h b/PhoneGapLib/Classes/PhoneGapDelegate.h
index ee88a65..edfa0f7 100755
--- a/PhoneGapLib/Classes/PhoneGapDelegate.h
+++ b/PhoneGapLib/Classes/PhoneGapDelegate.h
@@ -53,9 +53,3 @@ __attribute__((deprecated)) @interface PhoneGapDelegate : NSObject <UIApplicatio
 
 @end
 
-@interface NSDictionary (LowercaseKeys)
-
-- (NSDictionary*) dictionaryWithLowercaseKeys;
-
-@end
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/d68571fd/PhoneGapLib/Classes/PhoneGapDelegate.m
----------------------------------------------------------------------
diff --git a/PhoneGapLib/Classes/PhoneGapDelegate.m b/PhoneGapLib/Classes/PhoneGapDelegate.m
index ee10f3f..048a27e 100755
--- a/PhoneGapLib/Classes/PhoneGapDelegate.m
+++ b/PhoneGapLib/Classes/PhoneGapDelegate.m
@@ -20,6 +20,7 @@
 #import "PhoneGapDelegate.h"
 #import "PhoneGapViewController.h"
 #import "PGPlugin.h"
+#import "NSDictionary+LowercaseKeys.h"
 
 #define SYMBOL_TO_NSSTRING_HELPER(x) @#x
 #define SYMBOL_TO_NSSTRING(x) SYMBOL_TO_NSSTRING_HELPER(x)

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/d68571fd/PhoneGapLib/PhoneGapLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/PhoneGapLib/PhoneGapLib.xcodeproj/project.pbxproj b/PhoneGapLib/PhoneGapLib.xcodeproj/project.pbxproj
index 1555180..a4f3dd2 100644
--- a/PhoneGapLib/PhoneGapLib.xcodeproj/project.pbxproj
+++ b/PhoneGapLib/PhoneGapLib.xcodeproj/project.pbxproj
@@ -72,6 +72,10 @@
 		3035621714104C34006C2D43 /* PGWhitelistTests.m in Sources */ = {isa = PBXBuildFile; fileRef
= 30356213141049E1006C2D43 /* PGWhitelistTests.m */; };
 		3035621814104C3E006C2D43 /* PGWhitelistTests.h in Resources */ = {isa = PBXBuildFile; fileRef
= 30356212141049E1006C2D43 /* PGWhitelistTests.h */; };
 		30383DE01385F65600E37E22 /* Connection.m in Sources */ = {isa = PBXBuildFile; fileRef =
307A8F9D1385A2EC00E43782 /* Connection.m */; };
+		3047725B14C64D2700D535B5 /* NSDictionary+LowercaseKeys.h in Headers */ = {isa = PBXBuildFile;
fileRef = 3047725914C64D2700D535B5 /* NSDictionary+LowercaseKeys.h */; };
+		3047725C14C64D2700D535B5 /* NSDictionary+LowercaseKeys.h in Headers */ = {isa = PBXBuildFile;
fileRef = 3047725914C64D2700D535B5 /* NSDictionary+LowercaseKeys.h */; settings = {ATTRIBUTES
= (Public, ); }; };
+		3047725D14C64D2700D535B5 /* NSDictionary+LowercaseKeys.m in Sources */ = {isa = PBXBuildFile;
fileRef = 3047725A14C64D2700D535B5 /* NSDictionary+LowercaseKeys.m */; };
+		3047725E14C64D2700D535B5 /* NSDictionary+LowercaseKeys.m in Sources */ = {isa = PBXBuildFile;
fileRef = 3047725A14C64D2700D535B5 /* NSDictionary+LowercaseKeys.m */; };
 		304D303C14C4F74400261D84 /* PhoneGapDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef
= 30B05D6C14BD22F10046A9AC /* PhoneGapDelegate.m */; };
 		304D303E14C4F74700261D84 /* PhoneGapViewController.m in Sources */ = {isa = PBXBuildFile;
fileRef = 30B05D6E14BD22F10046A9AC /* PhoneGapViewController.m */; };
 		307A8F9E1385A2EC00E43782 /* Connection.h in Headers */ = {isa = PBXBuildFile; fileRef =
307A8F9C1385A2EC00E43782 /* Connection.h */; };
@@ -193,6 +197,8 @@
 		30325A0B136B343700982B63 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType
= text; path = VERSION; sourceTree = "<group>"; };
 		30356212141049E1006C2D43 /* PGWhitelistTests.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; path = PGWhitelistTests.h; sourceTree = "<group>";
};
 		30356213141049E1006C2D43 /* PGWhitelistTests.m */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.objc; path = PGWhitelistTests.m; sourceTree = "<group>";
};
+		3047725914C64D2700D535B5 /* NSDictionary+LowercaseKeys.h */ = {isa = PBXFileReference;
fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+LowercaseKeys.h";
path = "Classes/NSDictionary+LowercaseKeys.h"; sourceTree = "<group>"; };
+		3047725A14C64D2700D535B5 /* NSDictionary+LowercaseKeys.m */ = {isa = PBXFileReference;
fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+LowercaseKeys.m";
path = "Classes/NSDictionary+LowercaseKeys.m"; sourceTree = "<group>"; };
 		307A8F9C1385A2EC00E43782 /* Connection.h */ = {isa = PBXFileReference; fileEncoding = 4;
lastKnownFileType = sourcecode.c.h; name = Connection.h; path = Classes/Connection.h; sourceTree
= "<group>"; };
 		307A8F9D1385A2EC00E43782 /* Connection.m */ = {isa = PBXFileReference; fileEncoding = 4;
lastKnownFileType = sourcecode.c.objc; name = Connection.m; path = Classes/Connection.m; sourceTree
= "<group>"; };
 		30956FD0138F1F5600FC3563 /* PGMotion.h */ = {isa = PBXFileReference; fileEncoding = 4;
lastKnownFileType = sourcecode.c.h; name = PGMotion.h; path = Classes/PGMotion.h; sourceTree
= "<group>"; };
@@ -454,6 +460,8 @@
 				8887FD601090FBE7009987E8 /* Sound.h */,
 				8887FD611090FBE7009987E8 /* Sound.m */,
 				302965BB13A94E9D007046C5 /* PGDebug.h */,
+				3047725914C64D2700D535B5 /* NSDictionary+LowercaseKeys.h */,
+				3047725A14C64D2700D535B5 /* NSDictionary+LowercaseKeys.m */,
 			);
 			name = Commands;
 			sourceTree = "<group>";
@@ -536,6 +544,7 @@
 				8852C43B14B65FD800F0E735 /* PGViewController.h in Headers */,
 				8852C44014B65FD800F0E735 /* UIGapView.h in Headers */,
 				30B05DDA14BD24A10046A9AC /* PhoneGapDelegate.h in Headers */,
+				3047725C14C64D2700D535B5 /* NSDictionary+LowercaseKeys.h in Headers */,
 				30B05DDB14BD24A10046A9AC /* PhoneGapViewController.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -575,6 +584,7 @@
 				8852C43F14B65FD800F0E735 /* UIGapView.h in Headers */,
 				30B05D6F14BD22F10046A9AC /* PhoneGapDelegate.h in Headers */,
 				30B05D7114BD22F10046A9AC /* PhoneGapViewController.h in Headers */,
+				3047725B14C64D2700D535B5 /* NSDictionary+LowercaseKeys.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -786,6 +796,7 @@
 				30C684831406CB38004C1A8E /* PGWhitelist.m in Sources */,
 				30C684971407044B004C1A8E /* PGURLProtocol.m in Sources */,
 				30A90B9414588697006178D3 /* JSONKit.m in Sources */,
+				3047725E14C64D2700D535B5 /* NSDictionary+LowercaseKeys.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -836,6 +847,7 @@
 				8852C44114B65FD800F0E735 /* UIGapView.m in Sources */,
 				30B05D7014BD22F10046A9AC /* PhoneGapDelegate.m in Sources */,
 				30B05D7214BD22F10046A9AC /* PhoneGapViewController.m in Sources */,
+				3047725D14C64D2700D535B5 /* NSDictionary+LowercaseKeys.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};


Mime
View raw message