You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2012/03/28 03:15:47 UTC
[13/17] wp7 commit: Mark Cast callbacks as Obsolete
Mark Cast callbacks as Obsolete
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/commit/449ac058
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/tree/449ac058
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/diff/449ac058
Branch: refs/heads/master
Commit: 449ac058ba44d257cd60ee3e0f1e66beabfcf169
Parents: 552a3a6
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Mar 26 11:52:22 2012 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Mar 26 11:52:22 2012 -0700
----------------------------------------------------------------------
framework/Cordova/PluginResult.cs | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/449ac058/framework/Cordova/PluginResult.cs
----------------------------------------------------------------------
diff --git a/framework/Cordova/PluginResult.cs b/framework/Cordova/PluginResult.cs
index 8ea3059..85f02e8 100644
--- a/framework/Cordova/PluginResult.cs
+++ b/framework/Cordova/PluginResult.cs
@@ -98,8 +98,9 @@ namespace WP7CordovaClassLib.Cordova
/// <param name="status">Execution result</param>
/// <param name="message">The message</param>
public PluginResult(Status status, object message)
- : this(status, message, null)
{
+ this.Result = status;
+ this.Message = JSON.JsonHelper.Serialize(message);
}
/// <summary>
@@ -108,6 +109,8 @@ namespace WP7CordovaClassLib.Cordova
/// <param name="status">Execution result</param>
/// <param name="message">The message</param>
/// <param name="cast">The cast parameter</param>
+ ///
+ [Obsolete("Don't use Cast!!", false)]
public PluginResult(Status status, object message, string cast)
{
this.Result = status;
@@ -136,6 +139,7 @@ namespace WP7CordovaClassLib.Cordova
StringBuilder buf = new StringBuilder("");
if (this.Cast != null)
{
+ Debug.WriteLine(callbackId + "this.Cast = " + this.Cast);
buf.Append("var temp = " + this.Cast + "(" + this.ToJSONString() + ");\n");
buf.Append(String.Format("{0}('{1}',temp);", successCallback, callbackId));
}