You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2012/08/03 17:18:02 UTC
[1/9] ios commit: Update CDVCamera and CDVConnection to new exec
format.
Updated Branches:
refs/heads/master fe006aea3 -> 0b9c472b5
Update CDVCamera and CDVConnection to new exec format.
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/09a3a485
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/09a3a485
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/09a3a485
Branch: refs/heads/master
Commit: 09a3a48502acbc47b30b86ab926edf174d165b15
Parents: 8e97f50
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri Aug 3 11:06:38 2012 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Aug 3 11:16:59 2012 -0400
----------------------------------------------------------------------
CordovaLib/Classes/CDVCamera.m | 2 +-
CordovaLib/Classes/CDVConnection.m | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/09a3a485/CordovaLib/Classes/CDVCamera.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCamera.m b/CordovaLib/Classes/CDVCamera.m
index 18cf26b..6ad2eb5 100644
--- a/CordovaLib/Classes/CDVCamera.m
+++ b/CordovaLib/Classes/CDVCamera.m
@@ -64,7 +64,6 @@ static NSSet* org_apache_cordova_validArrowDirections;
- (void) takePicture:(CDVInvokedUrlCommand*)command
{
NSString* callbackId = command.callbackId;
- NSDictionary* options = [command.arguments objectAtIndex:0 withDefault:nil];
NSArray* arguments = command.arguments;
self.hasPendingOperation = NO;
@@ -137,6 +136,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
int width = 320;
int height = 480;
UIPopoverArrowDirection arrowDirection = UIPopoverArrowDirectionAny;
+ NSDictionary* options = [command.arguments objectAtIndex:10 withDefault:nil];
if (options) {
x = [options integerValueForKey:@"x" defaultValue:0];
y = [options integerValueForKey:@"y" defaultValue:32];
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/09a3a485/CordovaLib/Classes/CDVConnection.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVConnection.m b/CordovaLib/Classes/CDVConnection.m
index afa9951..f856fed 100644
--- a/CordovaLib/Classes/CDVConnection.m
+++ b/CordovaLib/Classes/CDVConnection.m
@@ -29,11 +29,11 @@
@synthesize connectionType, internetReach;
-- (void) getConnectionInfo:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options
+- (void) getConnectionInfo:(CDVInvokedUrlCommand*)command
{
CDVPluginResult* result = nil;
NSString* jsString = nil;
- NSString* callbackId = [arguments objectAtIndex:0];
+ NSString* callbackId = command.callbackId;
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:self.connectionType];
jsString = [result toSuccessCallbackString:callbackId];