package;
import flash.Lib;
import ru.stablex.ui.UIBuilder;
import ru.stablex.ui.widgets.Button;
import ru.stablex.ui.widgets.Box;
/**
* StablexUI example created in this manual: http://ui.stablex.ru/doc#manual/02_Basics.html
*/
class Main extends flash.display.Sprite{
/**
* Enrty point
*
*/
static public function main () : Void{
Lib.current.stage.align = flash.display.StageAlign.TOP_LEFT;
Lib.current.stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;
//initialize StablexUI
UIBuilder.init();
//Create UI and attach it to root display object
var gui = UIBuilder.buildFn('first.xml')();
Lib.current.addChild(gui);
var button = UIBuilder.create(Button,{w : 32, h : 32});
cast(gui.getChildByName('buttonBox'), Box).addChild(button);
}//function main()
}//class Main
compiling and running this on linux gives a Bus error (core dumped).
Using gdb I found out, that it seems to be a infinite recursion.
What I found out:
The error occurs when adding the button child.
removing the 'padding="50"' form the outer HBox solves the issue.
I have this example (derived from 02_first):
first.xml:
Main.hx:
compiling and running this on linux gives a Bus error (core dumped). Using gdb I found out, that it seems to be a infinite recursion.
What I found out: