You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bc...@apache.org on 2012/02/17 23:58:02 UTC

[13/16] android commit: Changed JavaScript invoked from PluginResult native code to use new modular JS approach

Changed JavaScript invoked from PluginResult native code to use new modular JS approach


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

Branch: refs/heads/master
Commit: a84d2eab02890015d9301649d6ede3a6a4c176ca
Parents: 5221354
Author: Fil Maj <fi...@nitobi.com>
Authored: Wed Jan 25 15:31:09 2012 -0800
Committer: Fil Maj <fi...@nitobi.com>
Committed: Wed Feb 15 10:39:20 2012 -0800

----------------------------------------------------------------------
 .../src/org/apache/cordova/api/PluginResult.java   |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/a84d2eab/framework/src/org/apache/cordova/api/PluginResult.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/api/PluginResult.java b/framework/src/org/apache/cordova/api/PluginResult.java
index 89ee1b5..3a12491 100755
--- a/framework/src/org/apache/cordova/api/PluginResult.java
+++ b/framework/src/org/apache/cordova/api/PluginResult.java
@@ -84,11 +84,11 @@ public class PluginResult {
 	}
 	
 	public String toSuccessCallbackString(String callbackId) {
-		return "Cordova.callbackSuccess('"+callbackId+"',"+this.getJSONString()+");";
+		return "require('cordova').callbackSuccess('"+callbackId+"',"+this.getJSONString()+");";
 	}
 	
 	public String toErrorCallbackString(String callbackId) {
-		return "Cordova.callbackError('"+callbackId+"', " + this.getJSONString()+ ");";
+		return "require('cordova').callbackError('"+callbackId+"', " + this.getJSONString()+ ");";
 	}
 	
 	public static String[] StatusMessages = new String[] {