From 4e31a99662ba6453f8908dbca704ac53954adbee Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Mon, 23 Sep 2019 03:38:38 -0400 Subject: [PATCH] hack to allow us to open file names passed on the commandline, which broke somehow --- .../Libraries/UniversalEditor.UserInterface/Engine.cs | 3 ++- .../UniversalEditor.UserInterface/MainWindow.cs | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs index 2def3a07..3f881194 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs @@ -608,7 +608,8 @@ namespace UniversalEditor.UserInterface } else { - Console.Error.WriteLine("ue: accessor not found for path " + fileNames[i]); + Console.Error.WriteLine("ue: accessor not found for path " + fileNames[i] + "; assuming local file"); + loadedDocuments.Add(new Document(new FileAccessor(fileNames[i]))); } } OpenWindow(loadedDocuments.ToArray()); diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs b/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs index 2307eca6..692e2321 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/MainWindow.cs @@ -267,7 +267,15 @@ namespace UniversalEditor.UserInterface private void dckContainer_SelectionChanged(object sender, EventArgs e) { - Editor editor = GetCurrentEditor (); + Editor editor = null; + try + { + editor = GetCurrentEditor(); + } + catch (Exception ex) + { + } + if (editor == null) { Console.WriteLine ("Editor is null"); } else {