T Troberg Well-Known Member Licensed User Longtime User Feb 2, 2015 #1 It's quite common to have code like this (snipped from a snippet elsewhere on the forum): Code: Copy If Not(L.IsInitialized) Then L.Initialize Mostly, it's because of the Android app lifecycle, but sometimes I use it in other contexts as well, such as when loading settings, and if that failed, initialize to empty list/map. The thing is, it's so common, that I think it would be nice to have a short form, in the form of a new initialize method: Code: Copy L.InitializeIfNeeded
It's quite common to have code like this (snipped from a snippet elsewhere on the forum): Code: Copy If Not(L.IsInitialized) Then L.Initialize Mostly, it's because of the Android app lifecycle, but sometimes I use it in other contexts as well, such as when loading settings, and if that failed, initialize to empty list/map. The thing is, it's so common, that I think it would be nice to have a short form, in the form of a new initialize method: Code: Copy L.InitializeIfNeeded