@nativescript/windows 0.1.0-alpha.43 → 0.1.0-alpha.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/framework/__PROJECT_NAME__/App.xaml.cs +23 -15
- package/framework/libs/arm64/nativescript.dll +0 -0
- package/framework/libs/devtools/arm64/nativescript.dll +0 -0
- package/framework/libs/devtools/x64/nativescript.dll +0 -0
- package/framework/libs/x64/nativescript.dll +0 -0
- package/package.json +1 -1
|
@@ -23,6 +23,9 @@ namespace __PROJECT_NAME__
|
|
|
23
23
|
{
|
|
24
24
|
_runtimeHost.Initialize();
|
|
25
25
|
|
|
26
|
+
// Capture before any await — continuations may resume on a thread pool thread.
|
|
27
|
+
var dispatcher = Window.Current.Dispatcher;
|
|
28
|
+
|
|
26
29
|
// Show crash report from the previous run if one exists.
|
|
27
30
|
try
|
|
28
31
|
{
|
|
@@ -61,24 +64,29 @@ namespace __PROJECT_NAME__
|
|
|
61
64
|
await CrashDiagnostics.ShowCrashDialogAsync("Script Execution Error", report);
|
|
62
65
|
}
|
|
63
66
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
// After any await, the continuation may run on a thread pool thread.
|
|
68
|
+
// Schedule all UI-thread-required operations through the dispatcher.
|
|
69
|
+
_ = dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
|
|
67
70
|
{
|
|
68
|
-
|
|
71
|
+
Windows.UI.Xaml.Media.CompositionTarget.Rendering += OnRenderFrame;
|
|
72
|
+
|
|
73
|
+
if (Window.Current.Content == null)
|
|
69
74
|
{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
Window.Current.Content = new Windows.UI.Xaml.Controls.TextBlock
|
|
76
|
+
{
|
|
77
|
+
Text = "NativeScript runtime initialized but no UI was rendered.\n" +
|
|
78
|
+
"Check the Output window for JS errors.",
|
|
79
|
+
Margin = new Windows.UI.Xaml.Thickness(20),
|
|
80
|
+
TextWrapping = Windows.UI.Xaml.TextWrapping.Wrap,
|
|
81
|
+
FontSize = 16,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
77
84
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
85
|
+
if (!e.PrelaunchActivated)
|
|
86
|
+
{
|
|
87
|
+
Window.Current.Activate();
|
|
88
|
+
}
|
|
89
|
+
});
|
|
82
90
|
}
|
|
83
91
|
|
|
84
92
|
private void OnSuspending(object sender, SuspendingEventArgs e)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|