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: 
jblack199
Visitor

BrightScript documentation?

Every real programming language has some sort of online documentation that spells out each function, what it's used for and such like that... Where is brightscripts documentation? and before someone says 'read the manual'... i've downloaded the SDK, i've read all the PDF's in the SDK several times -- the function list isnt there...
0 Kudos
24 REPLIES 24
destruk
Streaming Star

Re: BrightScript documentation?

For SDK 2.9 Public/Stable
Built-in functions are in section 6/page 30. Global functions are in section 7, page 33. Global String functions are in section 8, page 36, global math functions are in section 9, page 38. Reserved words are in Appendix C page 56.

For SDK 3.0 Beta
Built-in functions are in section 6/page 34. Global functions are in section 7, page 37. Global String functions are in section 8, page 40, global math functions are in section 9, page 42. Reserved words are in Appendix C page 74.

All of this is in the BrightscriptReferenceManual.pdf which is in the SDK archive in the "Documents" folder.

Edited to add 2.9 firmware revision information.
0 Kudos
jblack199
Visitor

Re: BrightScript documentation?

I've gone through them several, it's of absolutely no help... asking a question to the dev email they direct you here, asking a question here you get directed to read the documentation... so you read the documentation for the 30th time and it still doesn't help you...

I'm not new to coding by any means, but this documentation (or lack of it) is absolutely idiotic.

The documentation that you listed in your response exists sure, but is it helpful? not in the slightest. such as the first thing on page 34... sw = CreateObject("roGpioControlPort")

Okay so CreateObject I get that... but rogpiocontrolport what the hell is that.. do i have to create that? is it a function, or what... what's the point of using CreateObject? what's it do? any other ways of doing it? There is absolutely zero information on any of this type of stuff like any REAL documentation should have...

Lets look at PHP for example, http://www.php.net/manual/en/language.b ... hpmode.php which is the basic syntax of PHP. There is information and documented code examples about what it does, how it does it and how to use it instead of saying.. there is this function.. then this function.. then this function.. good luck! Where is the indepth documentation for brightscript or has roku decided that even they think brightscript is meaningless?

Roku is a joke.. My boss will be disappointed when I tell him to find a fire and die in it if he thinks im going to go through 'trial and error' trying to figure out this piece-meal garbage of a language...
0 Kudos
TheEndless
Channel Surfer

Re: BrightScript documentation?

[EDIT: I see the code snippet you referenced now]. You should refer to the ComponentReference.pdf for an explanation of all of the components available to the Roku Streaming Player. The component referenced in that sample is a BrightSign component, which also uses BrightScript, but is not a Streaming Player component, which is why you can't find it in the Streaming Player SDK.
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
destruk
Streaming Star

Re: BrightScript documentation?

In the brightscript reference 3.0 I see that on that page for roGPIOPort. It is solely used as an example. ro is for ROKU. GPIOPort is a control used for their Brightsign product, not the roku streaming video player. Brightscript is used for both the Brightsign product line as well as the Roku product line, and as it's proprietary it would be used for any other product Roku creates. Some controls do not work with Roku, others do not work with Brightsign.
A search on google for Roku GPIO brings up this link - http://www.hms-electronics.com/Roku/roku_hd_gpio.htm
I'd guess without that board available, and without the control rogpioport available in the firmware, you won't be able to create that object in your roku script.

Could the documentation be better? Of course it could. What I suggest for the best way to grasp how this fits together is to skim over the documentation available, briefly, and then look at some sdk example code like the basic poster screen sample. Get it to install as a package on your roku in developer mode and single step through the debugger to examine the lines that execute. Refer to the component reference for help on specific objects/components, and the brightscript reference for the functions. It took me about a month to grasp the concepts on how roku does things but I'm sure you'll pick it up quicker than I did. Training should be 'billable time' for your boss because once you understand this part you can code whatever he wants quite efficiently and easily (for most things!).

btw - as TheEndless suggested, the Component Reference PDF contains 'most' of the common components you will use createobject for in the Roku environment. Some extras are in the brightscript manual PDF if you have 3.0 firmware installed like roScreen. Perhaps they will merge those over to the component reference after public release of 3.0 as it would be easier to have it all in one place.
0 Kudos

Re: BrightScript documentation?

I must say that I understand jblack99's frustration.

I have been scripting for several years now, and have trouble understanding how to do things in Brightscript, too.

It seems there needs to be more examples, along with explanations.

Perhaps there is value in someone writing an instructional manual that has guided steps? Could this be a community project?

-
Bruce
0 Kudos
gonzotek
Visitor

Re: BrightScript documentation?

"brucerothwell" wrote:
I must say that I understand jblack99's frustration.

I have been scripting for several years now, and have trouble understanding how to do things in Brightscript, too.

It seems there needs to be more examples, along with explanations.

Perhaps there is value in someone writing an instructional manual that has guided steps? Could this be a community project?

-
Bruce

Have you seen Roku's developer blog yet?
http://blog.roku.com/developer/

It's not a complete instructional manual, but it does at least provide some decent examples with plenty of explanatory text. There's a "Hello, World" example here with three variations on the theme: http://blog.roku.com/developer/2011/05/ ... o-world-2/
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
0 Kudos

Re: BrightScript documentation?

How about this... I've got some example code, that seems to be based on a videoplayer style example, but I am building a channel based on the MRSS template... quite different. I want to figure out how apply the example code for the Resume functionality, but I can't seem to get my head around it.

I just haven't landed on that one thing that turns on the light bulb for me.
0 Kudos
RokuMarkn
Visitor

Re: BrightScript documentation?

In the VideoPlayer sample, the resume functionality is handled mostly in showDetailScreen, by the code that sets the PlayStart time before calling ShowVideoScreen. In the MRSSTemplate example, the similar function is ShowSpringboardScreen. You would just set PlayStart in the same way before calling ShowVideoScreen. You'll also need to store the playback position in the registry when your video player gets an isPlaybackPosition message, like showVideoScreen in the VideoPlayer example does. (This assumes that you're storing the playback position in the registry -- if you're storing it in the cloud or on your server, you'll do that part differently.)

--Mark
0 Kudos
jblack199
Visitor

Re: BrightScript documentation?

I've been programming for more than a couple years... Lets try somewhere around near 23 years.... I've been around the block and know A LOT of different languages.

Brightscript guys say this is based off javascript, but to me it looks a lot more like visual basic and some hints of javascript.. okay fine.. so this is visual basic turned into a scripting language I can dig it...

the reference pdf exists, but it doesn't go in depth about the functions and what they do exactly. The lack of documentation for this is obsurd and idiotic for roku not to have created a better documentation for developers. Doing so would reduce the amount of crap posts on the forums (such as this thread here), and more developers would be apt to learn the language thus further perpetuating the size of roku.

This simplevideoplayer example, is 254 lines.. it really takes 254 lines of bright script to tell roku 'hey play this video'? Plus in this example, i see functions that aren't even listed in the pdf files.. I took a look at the 'hello world' example in one of the above posts and I saw exactly what I expected to see... code... some useless text... more code.. and some more useless text.. it didn't explain what they were doing, why the were doing it or anything like that.. just here this is code.. look at it...

So really the problem here is, whoever created the pdf's and whoever created brightscript are complete idiots. I could post a lot of code here trying to explain how to do something in PHP, or ASP, or Python, or C#, C++, assembly or numerous other languages. But without documentation, you'd have no clue what you're looking at and that would be my fault for not explaining it correctly. And that is the problem with the brightscript documentation, it is utterly useless in trying to figure out what the functions do...

like the function CreateObject i can figure that out, it creates an object pretty simple.. but what's the object? is the object defined by the rofunction you pass into it? and what are these rofunctions? what does each one do? and how bout some comments in the examples.. that might help a bit... ' ** showSpringboardScreen(); as a comment doesn't tell me anything.. Sure i guess it shows a spring board i can dig it... but what does the 50 lines between the function declaration and the function end do? i can understand if else elseif, endif while loops in there and such but again it all comes down to the lack of genuine and helpful documentation.. and when online chat refers you to the developers email, the developers email refers you to the forums and the forums refer you to the pdf's as if one hasn't read them 100 times already then there is something wrong with everything.

These are just SOME of the questions a new developer to brightscript might have... and if brightscript was my FIRST language -- the horrible and idiotic documentation would have put me off to programming completely.. So come on brightscript creators get your heads out of your asses and create a documentation for this crap you call brightscript that would actually help someone....
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.