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 2013/02/04 21:31:48 UTC

[2/7] wp7 commit: [CB-1593] Fix for multiple callbacks when playing a media file

[CB-1593] Fix for multiple callbacks when playing a media file


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

Branch: refs/heads/master
Commit: d18c94b08c764688b1a3b676652cb5b552c3499c
Parents: 9d6837c
Author: Benn Mapes <be...@gmail.com>
Authored: Thu Jan 24 17:33:26 2013 -0800
Committer: Benn Mapes <be...@gmail.com>
Committed: Thu Jan 24 17:33:26 2013 -0800

----------------------------------------------------------------------
 templates/standalone/cordovalib/NativeExecution.cs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d18c94b0/templates/standalone/cordovalib/NativeExecution.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/cordovalib/NativeExecution.cs b/templates/standalone/cordovalib/NativeExecution.cs
index 4b8b52e..9459ffc 100644
--- a/templates/standalone/cordovalib/NativeExecution.cs
+++ b/templates/standalone/cordovalib/NativeExecution.cs
@@ -90,6 +90,7 @@ namespace WPCordovaClassLib.Cordova
                     this.OnCommandResult(commandCallParams.CallbackId, res);
                 };
 
+                bc.OnCommandResult -= OnCommandResultHandler;
                 bc.OnCommandResult += OnCommandResultHandler;
 
                 EventHandler<ScriptCallback> OnCustomScriptHandler = delegate(object o, ScriptCallback script)
@@ -97,7 +98,7 @@ namespace WPCordovaClassLib.Cordova
                     this.InvokeScriptCallback(script);
                 };
 
-
+                bc.OnCustomScript -= OnCustomScriptHandler;
                 bc.OnCustomScript += OnCustomScriptHandler;
 
                 // TODO: alternative way is using thread pool (ThreadPool.QueueUserWorkItem) instead of