Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jedashford
Channel Surfer

screen.getGlobalNode() fails - Member function not found...

Roku 4, 7.0 firmware.

If I copy the code example here: https://sdkdocs.roku.com/display/sdkdoc/ifRoSGScreen#ifRoSGScreen-getGlobalNode()

I get the failure below in the console. If I customize my code to use the getGlobalNode() I also get the same failure, what am I missing? Is this not available in my firmware version?

Current Function:
003: sub showLandingA()
004: print "in showChannelSGScreen"
005: screen = CreateObject("roSGScreen")
006: m.port = CreateObject("roMessagePort")
007: screen.setMessagePort(m.port)
008:* m.global = screen.getGlobalNode()
009: m.global.id = "GlobalNode"
010: m.global.addFields( {red: &hff0000ff, green: &h00ff00ff, blue: &h0000ffff} )
011: scene = screen.CreateScene("TrivialScene")
012: screen.show()
Member function not found in BrightScript Component or interface. (runtime error &hf4) in pkg:/source/landing.brs(8)
0 Kudos
2 REPLIES 2
TheEndless
Channel Surfer

Re: screen.getGlobalNode() fails - Member function not found

getGlobalNode() is new to 7.1.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
EnTerr
Roku Guru

Re: screen.getGlobalNode() fails - Member function not found

Can somebody @RokuCo ask Mr.Reid to please kindly note for new functions, in which firmware# it was added? Just like RokuKC does, so can he.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.