-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Labels
Milestone
Description
It would be nice be able to support "mixins" to interfaces...
Basically, some way of being able to say this interface is composed of these other interfaces:
Eg. source/mixins/alpha.bs:
interface AlphaM
alpha as boolean
end interface
sub initAlpha()
m.alpha = true
end sub
components/MyComponent.xml
<component name="MyComponent" extends="Group">
<script type="text/brightscript" uri="pkg:/source/mixins/alpha.bs" />
<interface>
<field id="text" type="string" />
</interface>
</component>
components/MyComponent.bs
typecast m as MyComponentM
interface MyComponentM
top as roSGNodeMyComponent
include AlphaM ' not married to this syntax, but this is the magic
end interface
sub init()
initAlpha()
print m.alpha ' this is known to be a boolean
end sub