EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2014
06:38 PM
Bug? roCaptionRenderer has no ifGetMessagePort/ifSetMess...
Discrepancy - documentation http://sdkdocs.roku.com/display/sdkdoc/ ... onRenderer promices ifGetMessagePort/ifSetMessagePort interfaces, implementation does not deliver:
BrightScript Debugger> vp = createObject("roVideoPlayer")
BrightScript Debugger> cr = vp.getCaptionRenderer()
BrightScript Debugger> ? cr
<Component: roCaptionRenderer>
BrightScript Debugger> ? getInterface(cr, "ifCaptionRenderer")
<Interface: ifCaptionRenderer>
BrightScript Debugger> ? getInterface(cr, "ifGetMessagePort")
invalid
BrightScript Debugger> ? getInterface(cr, "ifSetMessagePort")
invalid
BrightScript Debugger> ? cr.getMessagePort()
Member function not found in BrightScript Component or interface. (runtime error &hf4) in $LIVECOMPILE(156)
2 REPLIES 2

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2014
02:37 PM
Re: Bug? roCaptionRenderer has no ifGetMessagePort/ifSetMess
You can use SetMessagePort(port), but from my testing, it appears that GetMessagePort is not implemented, even though it is documented as being a valid method.
- Joel
BrightScript Debugger> cr=createobject("rocaptionrenderer")
BrightScript Debugger> ?cr
<Component: roCaptionRenderer>
BrightScript Debugger> ?cr.getmessageport()
Member function not found in BrightScript Component or interface. (runtime error &hf4) in $LIVECOMPILE(13)
BrightScript Debugger> port=createobject("romessageport")
BrightScript Debugger> cr.setmessageport(port)
BrightScript Debugger> ?cr.getmessageport()
Member function not found in BrightScript Component or interface. (runtime error &hf4) in $LIVECOMPILE(16)
- Joel
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2014
04:10 PM
Re: Bug? roCaptionRenderer has no ifGetMessagePort/ifSetMess
"RokuJoel" wrote:
You can use SetMessagePort(port), but from my testing, it appears that GetMessagePort is not implemented, even though it is documented as being a valid method.
Indeed. And as you see from my example above, it does not return ifGetMessagePort/ifSetMessagePort interfaces - which documentations says it supports and therefore should have. In case you have not used getInterface() before, it returns something non-invalid for objects that support particular interfaces. I have used it on many objects and roCaptionRenderer is the only exception i have seen.
So it is either a bug to file or documentation to fix (which will be interesting to see, documenting getMessagePort() without ifGetMessagePort )