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: 
jbrave
Channel Surfer

Converting Java App to Brightscript

first question:

Does this:

Somekindathing() {

a = something();
b = somethingelse();
}

translate to

somekindathing={
a:something()
b:somethingelse()
}

?
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
2 REPLIES 2
RokuChris
Roku Employee
Roku Employee

Re: Converting Java App to Brightscript

Short answer, no.

Your first code snippet is a Java function definition, the second is a BrightScript roAssociativeArray definition. In Java, braces are used to define code blocks, which is not true in BrightScript. In BrightScript, braces denote a roAssociativeArray. The Java code would translate to BrightScript as something like this...

sub Somekindathing()
a = something()
b = somethingelse()
end sub
0 Kudos
jbrave
Channel Surfer

Re: Converting Java App to Brightscript

Thanks! I'm sure I'll have some more questions later, hope you don't mind.

- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
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.