sjbarag / brs

An interpreter for the BrightScript language that runs on non-Roku platforms.
MIT License
113 stars 43 forks source link

itemSpacings and translation aren't updated properly if they are defined in the xml file. #610

Open vbuchii opened 3 years ago

vbuchii commented 3 years ago

While running tests itemSpacings and translation aren't updated properly if they are defined in the xml file.

SomeComponent.xml

<?xml version="1.0" encoding="utf-8" ?>
<component name="SomeComponent" extends="Node">
    <script type="text/brightscript" uri="pkg:/components/SomeComponent.brs" />
    <children>
        <LayoutGroup id="group"
            itemSpacings="[25]"
            layoutDirection="vert"
            translation="[100, 50]" >
        </LayoutGroup>
    </children>
</component>

SomeComponent.brs

sub init()
    group = m.top.findNode("group")
    print "group.itemspacings = " group.itemspacings
    print "group.layoutDirection = " group.layoutDirection
    print "group.translation = " group.translation
end sub

Actual result:

    group.itemspacings = <Component: roArray> = []
    group.layoutDirection =  vert
    group.translation = <Component: roArray> = []

Expected result:

    group.itemspacings = <Component: roArray> = [25]
    group.layoutDirection =  vert
    group.translation = <Component: roArray> = [100, 50]
vbuchii commented 3 years ago

width, height properties defined in the XML file aren't updated too.