jf-roku/source/utils/globals.brs

16 lines
340 B
Plaintext
Raw Normal View History

sub initGlobal()
2021-07-09 20:08:32 +00:00
if m.globals = invalid
m.globals = CreateObject("roAssociativeArray")
end if
end sub
2021-07-09 20:08:32 +00:00
function getGlobal(key = "" as string) as dynamic
initGlobal()
return m.globals[key]
end function
2021-07-09 20:08:32 +00:00
sub setGlobal(key = "" as string, value = invalid as dynamic)
initGlobal()
m.globals[key] = value
end sub