I understand that global variables are a bad idea- See:
Although I’m not sure why Trimble should care if I use a local vs an instance variable in any given situation.
Strange that these 2 pages do not warn against them:
Also strange that many existing extensions use them:
$tStrings = LanguageHandler.new(“sandbox.strings”)
could easily be called as
tStrings = LanguageHandler.new(“sandbox.strings”)
within each method that needs it.
Another frequent example is in menu creation: eg:
$draw_terrain_submenu = UI.menu(“Draw”).add_submenu($tStrings.GetString(“Sandbox”))
Why would such a variable ever be needed outside of the
Maybe I’m missing something?