Closed hoseyjoe closed 7 years ago
In your test app its missing a "RecordListByUser.xml" file
Ok, there are / were quite a few issues with the test app you posted, however, once i fixed all those the issue that you are having is you are calling:
mainView = ComponentMacros.buildComponent("assets/ui/main.xml");
in the constructor before you are calling Toolkit.init()
. The Toolkit.init()
is responsible for a number of things, one of which is populating the "component registry" based on scanning the classpath. So thats why it doesnt work (ie, the component registry is empty). Moving Toolkit.init()
to the first line in the constructor solves the issue.
Sorry Ian.
No probs... Easy mistake. :)
I uploaded a previous zip. I must not have re zipped what I thought was issue. I have the issue in my code base but it seems to follow the rules. If I can get repeat I will reopen
I am sure it is the initialization order. this compiles in haxeui-nme but throws "WARNING: no class found for component". Small.zip
My end goal was to have a tableview that gets its layout in xml but the DS is provided dynamically
Agreed, something is wrong here. Even if i just move the <tableview/>
into main.xml
the same thing happens. Ill investigate.
Actually, thats not true, the problem is that the code is built for AddATable.newComponent
before the init macro has run and therefore populated the component registry.
Ok, one line fix... :)
Can you retest and close if fixed?
Cheers, Ian
Also, btw, there is an <import />
statement also, eg:
<vbox>
<import resource="..." />
<import resource="..." />
<import resource="..." />
</vbox>
You dont have to use it of course, but in can help and remove duplication sometimes. :)
"WARNING: no class found for component" occurs when ComponentMacros.buildComponent is called outside of the static calls
Expected Behavior
I expected the Macro to run wherever it is called?
Steps to Reproduce (for bugs)
Test app / minimal test case
Small.zip
Your Environment
This appeared to work in flash (maybe CPP) but did not work in HTML5