m.screen = CreateObject("roSGScreen")
m.global = m.screen.getGlobalNode()
m.global.testing= "this is a test"
m.global.addFields( {testing: "this is a test" } )
"siekermantechnology" wrote:
In SceneGraph the closest thing I could think of would be to create a custom component of which you store an instance in m.global. It's not exactly the same thing, but it is possible to get close to what you would want to achieve.
<script type="text/brightscript" uri="pkg:/source/utils.brs" />
Function Utils() as Object
m.obj = createobject("roAssociativeArray")
m.obj.testing = Function()
end Function
Function reset()
end Function
this = {
obj: m.obj,
testMethod: m.obj.testing,
reset: resetCode
}
return this
end Function
Reporting().testMethod
Reporting().reset
Reporting().obj
"jaxim" wrote:
The following is what I tried to do but the methods referenced in the associative array return as invalid:
[...]
What am I doing wrong?
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!