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

Re: *** Warning v3.0 May Break your Channel ***

Might make more sense to simplify that to a single function call, instead of a nested one... like:
function typeNormalize(incoming as Dynamic)
incomingType = type(incoming)
if( incomingType = "Integer" ) return("roInt")
if( incomingType = "Float" ) return("roFloat")
if( incomingType = "String" ) return("roString")
if( incomingType = "Boolean" ) return("roBoolean")
if( incomingType = "Double" ) return("roDouble")
return(incomingType)
end function

Then just:
if( typeNormalize(foo) = "roInt" ) return
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
Binge Watcher

Re: *** Warning v3.0 May Break your Channel ***

Wouldn't it make more sense to do the renaming internally to retain compatibility with more channels, rather than requiring every channel to be tested? Mine work now, so it wouldn't affect me, just thinking of anyone who doesn't frequent the forums who wrote a channel before.
0 Kudos
SolveLLC
Visitor

Re: *** Warning v3.0 May Break your Channel ***

"destruk" wrote:
Wouldn't it make more sense to do the renaming internally to retain compatibility with more channels, rather than requiring every channel to be tested? Mine work now, so it wouldn't affect me, just thinking of anyone who doesn't frequent the forums who wrote a channel before.



I agree with destruk. Software should always maintain backwards compatibility unless it is impossible to do so and the thing that makes it impossible is absolutely compelling. In a symbiotic relationship that Roku has with it's developers, I would have thought that maintaining channel functionality would been more important.
0 Kudos
dmitskevich
Visitor

Re: *** Warning v3.0 May Break your Channel ***

When v.3.0 are going to be rolled out to all Roku boxes?

When I check firmware version on my box I see v.3.0 but I have not asked for update. Does it mean that now other people also have v.3.0 and I can use 3.0 features in my code?
0 Kudos
renojim
Community Streaming Expert

Re: *** Warning v3.0 May Break your Channel ***

I believe 3.0 has been rolled out to everyone with a Roku 1. Roku 2 boxes are on 4.0, so 3.0 features should work for everyone.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
dmitskevich
Visitor

Re: *** Warning v3.0 May Break your Channel ***

At the https://owner.roku.com/Developer/DevHome it still returns 2.9 documentation.
And also on this forum, there is not clear indication, that 3.0 is in production now.
Somebody from Roku, please comment. Thanks in advance!
0 Kudos
gonzotek
Visitor

Re: *** Warning v3.0 May Break your Channel ***

I'm not from Roku, but Roku officially began rolling 3.0 to all users on October 12th, 2011 (and by now Roku1 should have it). See here for the announcement:
viewtopic.php?f=28&t=44421

The public sdk for 3.0 and above is still considered beta, but the documentation and examples should be used instead of 2.9 (as this thread indicates, 3.0 has stricter syntax, and there are new features available). Roku has sometimes been a few months behind getting the sdk out, after a firmware release. They've also been adding new staff(to help improve user, tester and developer support) that all have to be brought up to speed first.
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
dmitskevich
Visitor

Re: *** Warning v3.0 May Break your Channel ***

Thank you for the information!
0 Kudos
EnTerr
Roku Guru

Re: *** Warning v3.0 May Break your Channel ***

"RokuKevin" wrote:
It's not just strings that are affected by this issue. It's any intrinsic type that can be autoboxed.... Including
Integer, roInteger

There is no "roInteger", is there? Other than one place in the docs:
"BrightScript 3 Compatibility" wrote:
* Container components now store intrinsic typed values, not an auto boxed values. In other words, a=[5] will store an integer 5 in an array, not an roInteger component. This change causes less memory to be used, and execution to be faster.

For better or worse, boxed Integer seems to be "roInt"
BrightScript Debugger> ? createObject("roInteger")
invalid
BrightScript Debugger> ? createObject("roInt")
0

PS. Wait... whaaaaat? What magic is this
BrightScript Debugger> i = 42
BrightScript Debugger> arr = [i]
BrightScript Debugger> j = arr[0]
BrightScript Debugger> ? type(i), type(j)
Integer roInteger

What's the difference between roInteger and roInt?
And documentation above just said "a=[5] will store an integer 5 in an array, not an roInteger"?
0 Kudos