Forum Discussion

pmpascua's avatar
pmpascua
Visitor
9 years ago

Defining custom component & interface only in .brs file?

Hello I recently start learning Roku development and have come from a background that heavily relies on OOP design, so it came as a surprise that you can't define custom classes here, more so with inheritance and interfaces, and that everything is exposed publicly . Then come across the 'component' and 'interface' key defined from the SDK inside eclipse. I was wondering, since the two looks closely relevant to classes and interfaces, would it be possible to create a custom components and interfaces using only brs file . If there is, could you give an example here? 

Thanks in advance

Note: My project involves building it as a library, so I'm curious on how the SDK doesn't publicly expose the implementation of the intrinsic components & interfaces
  • I don't think so. That is not possible currently - per my understanding, because all XML is pre-compiled before app execution - so no real extensibility. But moreover that is not forthcoming, because... uh, i got nothing - no because.

    On a related note, see my struggle at viewtopic.php?f=34&t=95290