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/07/14 02:24:43 UTC

[42/46] wp7 commit: [CB-986] backbutton navigation error

[CB-986] backbutton navigation error


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/523b3801
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/tree/523b3801
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/diff/523b3801

Branch: refs/heads/master
Commit: 523b3801c20426aa4f515636a59ec240a0152d9d
Parents: 62f9f69
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Jul 10 14:25:48 2012 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Jul 10 14:25:48 2012 -0700

----------------------------------------------------------------------
 framework/Cordova/Commands/Capture.cs      |    2 +-
 framework/Cordova/UI/AudioRecorder.xaml.cs |   20 +++++++++++---------
 2 files changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/523b3801/framework/Cordova/Commands/Capture.cs
----------------------------------------------------------------------
diff --git a/framework/Cordova/Commands/Capture.cs b/framework/Cordova/Commands/Capture.cs
index 25d22e3..6fe0b25 100644
--- a/framework/Cordova/Commands/Capture.cs
+++ b/framework/Cordova/Commands/Capture.cs
@@ -62,7 +62,7 @@ namespace WP7CordovaClassLib.Cordova.Commands
         public class CaptureAudioOptions
         {
             /// <summary>
-            /// The maximum number of images the device user can capture in a single capture operation. The value must be greater than or equal to 1 (defaults to 1).
+            /// The maximum number of audio files the device user can capture in a single capture operation. The value must be greater than or equal to 1 (defaults to 1).
             /// </summary>
             [DataMember(IsRequired = false, Name = "limit")]
             public int Limit { get; set; }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/523b3801/framework/Cordova/UI/AudioRecorder.xaml.cs
----------------------------------------------------------------------
diff --git a/framework/Cordova/UI/AudioRecorder.xaml.cs b/framework/Cordova/UI/AudioRecorder.xaml.cs
index 8f19a7b..5cfbf61 100644
--- a/framework/Cordova/UI/AudioRecorder.xaml.cs
+++ b/framework/Cordova/UI/AudioRecorder.xaml.cs
@@ -173,6 +173,11 @@ namespace WP7CordovaClassLib.Cordova.UI
         {
             this.result = this.SaveAudioClipToLocalStorage();
 
+            if (Completed != null)
+            {
+                Completed(this, result);
+            }
+
             if (this.NavigationService.CanGoBack)
             {
                 this.NavigationService.GoBack();
@@ -185,20 +190,14 @@ namespace WP7CordovaClassLib.Cordova.UI
         /// <param name="e"></param>
         protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
         {
-            if (this.IsRecording)
+            if (IsRecording)
             {
                 StopRecording();
             }
 
             this.FinalizeXnaGameLoop();
 
-            if (this.Completed != null)
-            {
-                this.Completed(this, result);
-            }
-
             base.OnNavigatedFrom(e);
-
         }
 
         /// <summary>
@@ -296,8 +295,11 @@ namespace WP7CordovaClassLib.Cordova.UI
         private void FinalizeXnaGameLoop()
         {
             // Timer to simulate the XNA game loop (Microphone is from XNA)
-            this.dtXna.Stop();
-            this.dtXna = null;
+            if (dtXna != null)
+            {
+                dtXna.Stop();
+                dtXna = null;
+            }
         }