Hi there,
I am pretty sure i could do
– assets
---- ui
-------- a.xml
-------- b.xml
where a.xml =
<?xml version="1.0" encoding="utf-8"?>
<vbox id="main">
<import resource="assets/ui/b.xml" />
</vbox>
where b.xml =
<?xml version="1.0" encoding="utf-8"?>
<label text="I am nested"/>
Then when doing
Toolkit.init();
var app = ComponentMacros.buildComponent("assets/ui/a.xml");
Screen.instance.addComponent(app);
“I am nested” would display.
But it doesn’t.
What am i doing wrong ?
Thanks
So this used to always catch me also, the original attribute was source
not resource
, however, i used to try and use resource
so often that i thought i made a fix to allow either - i just checked and infact i hadnt done it properly, so it would only work with source
- that bug is fixed now in haxeui-core git (thanks!), so you can use either source
or resource
, if you arent using git version then only source
will work
Ian
Hi Ian
I pulled the master it works with source not resource
There is another issue the nested external component does layout the same as it did when embed in the same file.
(Typically Tabview seems broken).
What do you think it could be ?
Whoops, i commited to the wrong branch, should be in master now - im not sure what you mean by the second bit, any code / xml?
Cheers,
Ian
All good now, thanks Ian.
source and resource work fine now !
(tableview too… I probably did some mixing up with the XML while trying to test the import stuff).
Cheers !
1 Like