Your Digital Media Has Never Looked So Good

 
pmd333
Topic Author
Posts: 4
Joined: Mon Oct 27, 2014 10:57 pm

Brightscript logging and error handling

Tue May 05, 2015 8:55 pm

hi,

I am new to channel development and would like to make a simple arithmetic app. I would like to put in logging and error handling into my bs in the beginning, but I'm not experienced in doing that because I have usually relied on a debugger for that instead. It would be nice to also eventually turn the logging into something that could be used for tracing user problems and logging some statistics on user behavior to a server. So I'm tempted to do something strange like rely on the eval/run commands, but I'm trying to resist. I'm hoping someone more experienced can provide some tips.

Thank you,
pmd
 
dev42
Posts: 82
Joined: Thu May 24, 2012 9:43 pm

Re: Brightscript logging and error handling

Wed May 06, 2015 4:26 pm

pmd333 wrote:
So I'm tempted to do something strange like rely on the eval/run commands

I'll parrot what the guru's around these parts have said, "don't use eval/run". That said, if you're looking to make a data driven app that pulls "lessons" / "levels" from the 'net, I'm sure it can be done!

I'm also sure you can do logging and save it to the 'net.... but unfortunately, I don't know how ( yet ) and I'm not well versed in the privacy concerns. You can fetch an ID/model # from the unit, but what if your demographic included families with more than one student? or twins?!
 
pmd333
Topic Author
Posts: 4
Joined: Mon Oct 27, 2014 10:57 pm

Re: Brightscript logging and error handling

Wed May 06, 2015 6:28 pm

It looks like someone posted a library to help get started called librokudev on github. I will start there.
 
pmd333
Topic Author
Posts: 4
Joined: Mon Oct 27, 2014 10:57 pm

Re: Brightscript logging and error handling

Wed May 06, 2015 6:34 pm

Also someone posted brstest on github. Maybe I can use that to help with testing and cut down on the need for logging and error handling.
 
sna
Posts: 2
Joined: Thu Aug 06, 2015 5:25 am

Re: Brightscript logging and error handling

Thu Aug 06, 2015 6:04 am

Hi,

I'm new to ROKU, I'm just exploring how to use brstest. If anybody can let me know how can I use brstest with example programs will be very helpful and appreciated.
 
sjb64
Posts: 108
Joined: Thu Apr 16, 2015 1:13 pm
Location: Memphis, TN

Re: Brightscript logging and error handling

Thu Aug 06, 2015 7:36 am

Might be a dumb question but...

If you wrote an app that downloaded an external file to a string or tmp:/ (containing code) that was then processed using Eval/Run, could that app even pass QA for a public channel? There would be no way to test the future downloaded code to ensure it met standards and rules (not a menu system, etc.), as the code could be changed at will after publication.
FlixRaider channel
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Re: Brightscript logging and error handling

Thu Aug 06, 2015 4:37 pm

Part of the Developer Agreement states: "The Channel Applications will not download or install executable code." Seems to me that downloading BRS and executing it with Run/Eval would violate this. I'm not sure how long that clause has been around since I know of at least one very old public channel that did just that.

-JT
 
User avatar
Komag
Posts: 808
Joined: Fri Aug 22, 2014 3:42 am

Re: Brightscript logging and error handling

Thu Aug 06, 2015 6:33 pm

I don't think that counts, you would be downloading brightscript code, which I would interpret is just passive code, not downloading and running some sort of exe file, which I think that rule specifically is talking about. But of course I may be wrong.
 
sjb64
Posts: 108
Joined: Thu Apr 16, 2015 1:13 pm
Location: Memphis, TN

Re: Brightscript logging and error handling

Fri Aug 07, 2015 5:40 am

On a Roku with the eval/run ability, Brightscript is executable code, so I think it would definitely be the target of that clause. I don't know if anyone at Roku actually unzips the package and looks at source code, either manually or by an automated system looking for triggers so see if clauses like there are violated. But regardless, my concern, which it turns out TheEndless has addressed previously in the forums, is addressed.

On a side note, I didn't mean to hijack pmd333's thread, if anyone wants to continue this discussion let's start a new thread.
FlixRaider channel

Who is online

Users browsing this forum: No registered users and 6 guests