incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tim...@apache.org
Subject docs commit: fixing up a few typos and cleaned up some references
Date Tue, 24 Jul 2012 23:13:47 GMT
Updated Branches:
  refs/heads/master f1ad0cc74 -> 0b154198f


fixing up a few typos and cleaned up some references


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

Branch: refs/heads/master
Commit: 0b154198f14537cefb26d4f2b718dbb8335d52ce
Parents: f1ad0cc
Author: Tim Kim <tim.kim@nitobi.com>
Authored: Tue Jul 24 16:13:38 2012 -0700
Committer: Tim Kim <tim.kim@nitobi.com>
Committed: Tue Jul 24 16:13:38 2012 -0700

----------------------------------------------------------------------
 .../guide/plugin-development/blackberry/index.md   |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/0b154198/docs/en/edge/guide/plugin-development/blackberry/index.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/guide/plugin-development/blackberry/index.md b/docs/en/edge/guide/plugin-development/blackberry/index.md
index 03cdde8..8d5cd02 100644
--- a/docs/en/edge/guide/plugin-development/blackberry/index.md
+++ b/docs/en/edge/guide/plugin-development/blackberry/index.md
@@ -80,7 +80,6 @@ the action that we want to execute within the class as well as the arguments.
In
     import org.apache.cordova.json4j.JSONArray;
     import org.apache.cordova.json4j.JSONException;
     import org.apache.cordova.json4j.JSONObject;
-    import org.apache.cordova.util.Logger;
     /**
      * A simple plugin to demonstrate how to build a plugin for Blackberry
      * Basically echos back the msg that a user calls to this plugin 
@@ -93,12 +92,11 @@ the action that we want to execute within the class as well as the arguments.
In
             PluginResult result = new PluginResult(PluginResult.Status.INVALID_ACTION, "Echo:
Invalid action:" + action);
             if(action.equals(echo)){
                 try {
-                    JSONObject echoObj = new JSONObject();
                     String theMsg = args.getString(0);
-                    if(theMsg.length()>0){   
+                    if(theMsg!= null || theMsg.length()>0){   
                         result = new PluginResult(PluginResult.Status.OK, theMsg);
                     }else{
-                        result = new PluginResult(PluginResult.Status.ERROR, theMsg);
+                        result = new PluginResult(PluginResult.Status.ERROR, "Nothing to
echo.");
                     }
                 } catch (JSONException e) {
                     result = new PluginResult(PluginResult.Status.JSON_EXCEPTION, e.getMessage());


Mime
View raw message