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.
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)
“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 )