Skip to content

initUI unknown identifier #1

@francescoagati

Description

@francescoagati

trying to use tinyui with openfl i get this error

Source/Main.hx:16: characters 2-8 : Unknown identifier : initUI

this is the example code

package;

import openfl.display.Sprite;
import openfl.text.Font;
import openfl.text.TextField;
import openfl.text.TextFormat;
import openfl.Assets;


//import cocktail.api.CocktailView;

@:tinyui('ui/prova.xml')
class UI05ViewItem extends Sprite {
    public function new() {
        super();
        initUI();
    }
}
class Main extends Sprite {
        public function new() {
                super();

        }
}

and the xml file ui/prova.xml

<UI>
<!--You declare UI in a xml file, then `inject` into a haxe class by macro meta:
`@:build(TinyUI.build(path_to_xml_file))`
The injected class is call the `building class` -->
<!--`code` in xml can interact with code in .hx and vise versa
TinyUI is just a macro tool to translate xml into haxe code!-->
<!--See the generated code. TinyUI will generate a initUI function in the building class-->
</UI>

i' am using tinkui 6.0.1

and this the project.xml

<?xml version="1.0" encoding="utf-8"?>
<project>

    <meta title="Adding Text" package="org.openfl.samples.addingtext" version="1.0.0" company="OpenFL" />
    <app main="Main" path="Export" file="AddingText" />

    <source path="Source" />
    <haxelib name="openfl" />
    <!--<haxelib name="cocktail" />-->
    <haxelib name="tinyui" />
    <assets path="Assets" rename="assets"  />

</project>

I think that the problem is that build macro isn't processed

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