Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Haxe StablexUI添加到动态UI_Haxe_Openfl_Stablexui - Fatal编程技术网

Haxe StablexUI添加到动态UI

Haxe StablexUI添加到动态UI,haxe,openfl,stablexui,Haxe,Openfl,Stablexui,我有XML格式的UI: <HBox layout:Column-cols="[-1,140,100,100,60,120,100,-1]"> <Widget /> <Text name="'name1'" text="'img.png'" /> <Text name="'good1'" text="'1'" /> <Text name="'bad1'" text="'9'" /> <Text

我有XML格式的UI:

<HBox layout:Column-cols="[-1,140,100,100,60,120,100,-1]">
    <Widget />
    <Text name="'name1'" text="'img.png'" />
    <Text name="'good1'" text="'1'" />
    <Text name="'bad1'" text="'9'" />
    <Text name="'all1'" text="'10'" />
    <Text name="'average1'" text="'0.980'" />
    <Button name="'response1'" text="'Посмотреть'" defaults="'TableButton'" />
    <Widget />
</HBox>

我试图创建一个动态结构,但按下按钮,job参数中的列来自父级和函数,出现了问题。它是如何在stablex中实现的?(P.S xml结构的工作原理类似于演示接口示例)

在Haxe代码中,我这样做:

var logpage:VBox  = cast UIBuilder.get('logpage');
var cols:Array<Int> = [ -1, 140, 100, 100, 60, 120, 100, -1];
var Rowlog = UIBuilder.create(HBox, {
    //cast(Rowlog.layout, Column).cols  = cols, 
    children : [
        UIBuilder.create(Widget, {}),
        UIBuilder.create(Text, {
            text : json.image,
            name : 'name'+num
        }),
        UIBuilder.create(Text, {
            text : json.good_response,
            name : 'good'+num
        }),
        UIBuilder.create(Text, {
            text : json.bad_response,
            name : 'bad'+num
        }),
        UIBuilder.create(Text, {
            text : json.response_count,
            name : 'count'+num
        }),
        UIBuilder.create(Text, {
            text : json.response_time,
            name : 'time'+num
        }),
        UIBuilder.create(Button, {
            text : 'Посмотреть',
            name : '',
            defaults : 'TableButton'
            //on-click : goDownloadLog();
        }),
        UIBuilder.create(Widget, {})
    ]
});
logpage.addChild(Rowlog);
var-logpage:VBox=cast-UIBuilder.get('logpage');
var-cols:Array=[-11140100100,60120100,-1];
var Rowlog=UIBuilder.create(HBox{
//cast(Rowlog.layout,Column).cols=cols,
儿童:[
创建(小部件,{}),
UIBuilder.create(文本、{
text:json.image,
名称:“名称”+num
}),
UIBuilder.create(文本、{
text:json.good_响应,
名称:“好”+num
}),
UIBuilder.create(文本、{
text:json.bad_响应,
名称:“坏”+num
}),
UIBuilder.create(文本、{
text:json.response\u count,
名称:“计数”+num
}),
UIBuilder.create(文本、{
text:json.response_time,
名称:“时间”+num
}),
UIBuilder.create(创建)按钮{
文本:“Пбббббб”,
名称:“”,
默认设置:“TableButton”
//单击:goDownloadLog();
}),
创建(小部件,{})
]
});
logpage.addChild(Rowlog);