movingtarget
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2014
10:21 AM
roLocalization problem
Can someone please explain what's wrong here:
I'm using roLocalization object which should be supported (http://sdkdocs.roku.com/pages/viewpage. ... Id=3114060), and is in fact created. But the ifLocalization interface appears to not exist. How can I fix this? I'm on 5.5.
BrightScript Debugger> p loc
<Component: roLocalization>
BrightScript Debugger> p loc.GetPluralString
Syntax Error. (runtime error &h02) in $LIVECOMPILE(8)
BrightScript Debugger> p loc.GetLocalizedAsset
Syntax Error. (runtime error &h02) in $LIVECOMPILE(9)
I'm using roLocalization object which should be supported (http://sdkdocs.roku.com/pages/viewpage. ... Id=3114060), and is in fact created. But the ifLocalization interface appears to not exist. How can I fix this? I'm on 5.5.
4 REPLIES 4

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2014
10:24 AM
Re: roLocalization problem
You're trying to print the results of a method without any parameters or parentheses, which is resulting in a syntax error.
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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2014
11:28 AM
Re: roLocalization problem
Hm, yeah - BrightScript is funky like that. Depending on your language background, you may expect `obj.method` (no params) to either call the method (Ruby?) or to return a bound method function (Python):
But it doesn't - and can't blame it for it, because BRS is a different language. I suspect there was a complication in implementing this, so instead a runtime error is thrown (notice how this is not the usual flavor of "Syntax Error. (compile error &h02)").
>>> f = 'abcdefgh'.find
>>> f
<built-in method find of str object at 0x2b9620>
>>> f('d')
3
But it doesn't - and can't blame it for it, because BRS is a different language. I suspect there was a complication in implementing this, so instead a runtime error is thrown (notice how this is not the usual flavor of "Syntax Error. (compile error &h02)").
movingtarget
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2014
01:09 PM
Re: roLocalization problem
I was trying to show a sample... But if you insist - this doesn't work either:
BrightScript Debugger> loc = CreateObject("roLocalization")
BrightScript Debugger> p loc
<Component: roLocalization>
BrightScript Debugger> p loc.GetPluralString(2, "1 something", "^n somethings")
Member function not found in BrightScript Component or interface. (runtime error &hf4) in $LIVECOMPILE(9)

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2014
01:38 PM
Re: roLocalization problem
Looks like there was an error in the GetPluralString documentation. It should take 4 parameters. I've corrected it here.
--Mark
--Mark