diff --git a/Terminal.Gui/Application/Application.cs b/Terminal.Gui/Application/Application.cs index 31ea01efa..9e501f22c 100644 --- a/Terminal.Gui/Application/Application.cs +++ b/Terminal.Gui/Application/Application.cs @@ -352,13 +352,15 @@ public static partial class Application InitializedChanged?.Invoke (null, new (in _initialized)); } +#nullable enable /// - /// This event is fired after the and methods have been called. + /// This event is raised after the and methods have been called. /// /// /// Intended to support unit tests that need to know when the application has been initialized. /// - public static event EventHandler> InitializedChanged; + public static event EventHandler>? InitializedChanged; +#nullable restore #endregion Initialization (Init/Shutdown) diff --git a/Terminal.Gui/View/View.cs b/Terminal.Gui/View/View.cs index 88136f0ae..1e016e8ae 100644 --- a/Terminal.Gui/View/View.cs +++ b/Terminal.Gui/View/View.cs @@ -147,12 +147,12 @@ public partial class View : Responder, ISupportInitializeNotification } /// - /// Called when the command is invoked. Fires the + /// Called when the command is invoked. Raises /// event. /// /// - /// If the event was canceled. If the event was fired but not canceled. - /// If no event was fired. + /// If the event was canceled. If the event was raised but not canceled. + /// If no event was raised. /// protected bool? OnAccept () { diff --git a/Terminal.Gui/Views/ComboBox.cs b/Terminal.Gui/Views/ComboBox.cs index aec9d5f81..249519985 100644 --- a/Terminal.Gui/Views/ComboBox.cs +++ b/Terminal.Gui/Views/ComboBox.cs @@ -422,7 +422,7 @@ public class ComboBox : View if (SelectedItem > -1 && _listview.Source?.Count > 0) { - Text = _listview.Source.ToList () [SelectedItem].ToString (); + Text = _listview.Source.ToList () [SelectedItem]?.ToString (); } } else if (!ReadOnly) diff --git a/Terminal.Gui/Views/RadioGroup.cs b/Terminal.Gui/Views/RadioGroup.cs index 9d60dc950..aaaf8b981 100644 --- a/Terminal.Gui/Views/RadioGroup.cs +++ b/Terminal.Gui/Views/RadioGroup.cs @@ -84,7 +84,7 @@ public class RadioGroup : View { SelectedItem = _cursor; - return OnAccept () != false; + return OnAccept () is true or null; } ); @@ -97,7 +97,7 @@ public class RadioGroup : View { SelectedItem = (int)ctx.KeyBinding?.Context!; - return OnAccept () != false; + return OnAccept () is true or null; } return true;