Skip to content

Access xml from class #278

@varadig

Description

@varadig

There is a way to access object which is implemented in xml from haxe class?

upload.xml

<UploadScreen id="'upload'" childPadding="25" widthPt="100" heightPt="100" autoWidth="true">
    <CoreText format-size="30"
              format-font="'Arial'"
              format-color="0x656565"
              label-htmlText="'Drag and drop your pictures here!'"/>
    <CoreBox w="600" h="350"
             skin:Paint-borderColor="0xe7e7e7"
             skin:Paint-color="0xFFFFFF"
             skin:Paint-border="2"
             skin:Paint-corners="[30]">
        <CoreText id="'fileCounter'"
                  format-align="'center'"
                  format-size="60"
                  format-font="'Arial'"
                  format-color="0x636799"/>
    </CoreBox>
    <CoreText format-size="30"
              format-font="'Arial'"
              format-color="0x656565"
              label-htmlText="'or browse your computer'"/>
    <CoreButton text="'browse'"
                format-font="'Arial'"
                on-click="this.sc.getService($FileController.SERVICE_BROWSE_FILES).execute();"/>
    <CoreButton id="'proceedButton'"
                text="'proceed'"
                alpha="0"
                mouseEnabled="false"
                format-font="'Arial'"
                on-click="this.sc.getService($ViewController.SERVICE_SHOW_SCREEN).addParam($BaseController.DATA,{index:2,screenId:'editor',direction:'left'}).execute();"/>
</UploadScreen>

UploadScreen.hx:


package view.screen;
import ru.stablex.ui.UIBuilder;
import view.screen.base.BaseScreen;
class UploadScreen extends BaseScreen{
    public function new() {
        super();
//        trace(this.proceedButton);//no field proceedButton
        trace(UIBuilder.get('proceedButton'));//UploadScreen.hx:8: null
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions