EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2014
12:55 PM
SetMessagePort() without ifSetMessagePort... how/why?
I am utterly befuddled by this. I was under the impression that ALL BRS components have their methods implemented by way of BRS interfaces. I seem to recollect somewhere it was saying components are just a collection of interfaces and nothing else.
But here is example of it not being the case. By documentation, roParagraphScreen has ifSetMessagePort - but not in practice:
You can set the port with SetMessagePort() but the interface ifSetMessagePort is not there, how is that possible?
On the other hand, roUrlTransfer delivers on the promise of ifSetMessagePort - and so do many (most?) others:
But here is example of it not being the case. By documentation, roParagraphScreen has ifSetMessagePort - but not in practice:
BrightScript Debugger> para = CreateObject("roParagraphScreen")Same is the case with roListScreen, roCaptionRenderer and probably more.
BrightScript Debugger> ? para
<Component: roParagraphScreen>
BrightScript Debugger> ? getInterface(para, "ifSetMessagePort")
invalid
BrightScript Debugger> para.SetMessagePort(invalid)
BrightScript Debugger> para.ifSetMessagePort.SetMessagePort(invalid)
Interface not a member of BrightScript Component (runtime error &hf3) in $LIVECOMPILE(152)
You can set the port with SetMessagePort() but the interface ifSetMessagePort is not there, how is that possible?
On the other hand, roUrlTransfer delivers on the promise of ifSetMessagePort - and so do many (most?) others:
BrightScript Debugger> url = CreateObject("roUrlTransfer")
BrightScript Debugger> ? getInterface(url, "ifSetMessagePort")
<Interface: ifSetMessagePort>
BrightScript Debugger> url.ifSetMessagePort.setMessagePort(invalid)
BrightScript Debugger> url.setMessagePort(invalid)
BrightScript Debugger>