From 0d9ea2c40901d94e7d7fd7b54faae0fac2f9d711 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Fri, 25 Oct 2019 13:39:09 -0400 Subject: [PATCH] Comments --- Terminal.Gui/Core.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Terminal.Gui/Core.cs b/Terminal.Gui/Core.cs index 6f2eeb6d5..06d125332 100644 --- a/Terminal.Gui/Core.cs +++ b/Terminal.Gui/Core.cs @@ -245,6 +245,8 @@ namespace Terminal.Gui { public static ConsoleDriver Driver = Application.Driver; static IList empty = new List (0).AsReadOnly (); + + // This is null, and allocated on demand. List subviews; /// @@ -252,6 +254,9 @@ namespace Terminal.Gui { /// /// The subviews. public IList Subviews => subviews == null ? empty : subviews.AsReadOnly (); + + // Internally, we use InternalSubviews rather than subviews, as we do not expect us + // to make the same mistakes our users make when they poke at the Subviews. internal IList InternalSubviews => subviews ?? empty; internal Rect NeedDisplay { get; private set; } = Rect.Empty;