haxeui / haxeui-openfl

The OpenFL backend of the HaxeUI framework -
http://haxeui.org
MIT License
42 stars 14 forks source link

haxeui-openfl ComponentMacros error on Windows 10 x64 #22

Closed jgcop closed 3 years ago

jgcop commented 6 years ago

I try the following example for haxeui-openfl on windows 10: https://github.com/r3d9u11/haxe-basics/tree/master/4_ExtLib/4.4_GuiFrameworks/4.4.2_HaxeUI/4.4.2.1_SimpleGui/4.4.2.1.1_HaxeuiBackends/4.4.2.1.1.1_haxeui-openfl/4.4.2.1.1.1.1_Elements/TabBar

I try to compile it for Windows and get the following error: haxeui-core/0,0,3/haxe/ui/macros/ComponentMacros.hx:119: characters 24-25 : Unknown identifier : c0

Source/Main.hx:12: characters 20-71 : Called from macro here Source/Main.hx:12: characters 20-71 : Void should be haxe.ui.core.Component Source/Main.hx:12: characters 20-71 : For function argument ‘component’

Line 12 Main.hx: app.addComponent(ComponentMacros.buildComponent(“Assets/Xml/UI.xml”));

Line 118/119 ComponentMacros.hx: code.push(macro c0.script = $v{fullScript}); code.push(macro c0);

My dependencies: Windows 10 x64 actuate: [1.8.7]
flixel-addons: [2.5.0]
flixel-demos: [2.4.3]
flixel-templates: [2.4.6]
flixel-tools: [1.4.1]
flixel-ui: [2.2.0]
flixel: [4.3.0]
haxeui-core: [0.0.3]
haxeui-openfl: [0.0.2]
haxeui: [1.8.21]
hxcpp: [3.4.188]
hxcs: [3.4.0]
hxjava: [3.2.0]
hxLINQ: [1.2.0]
hxtools: [1.1.6]
kha: [16.1.2]
layout: [1.2.1]
lime-samples: [4.0.1]
lime: [6.0.1]
openfl-samples: [6.0.0]
openfl: [7.0.0]
snow: git [dev:C:\laragon\bin\HaxeToolkit\haxe\lib\snow\git]
snowfall: [0.0.16]
stablexui: [1.2.1]
waxe: [3.1.1]

ianharrigan commented 6 years ago

Hi,

I think you need to assign it to a variable since its building a UI from a macro (ie, quite a bit of code being inserted in)...

var x = ComponentMacros.buildComponent(“Assets/Xml/UI.xml”);
app.addComponent(x);

Should work...

ianharrigan commented 6 years ago

Although, thats strange that that sample has that method... ill check it out.

jgcop commented 6 years ago

i try it out with: line 12: var x = ComponentMacros.buildComponent(“Assets/Xml/UI.xml”); line 13: app.addComponent(x);

same error like befor HaxeToolkit/haxe/lib/haxeui-core/0,0,3/haxe/ui/macros/ComponentMacros.hx:118: characters 24-26 : Unknown identifier : c0 Source/Main.hx:12: characters 19-70 : Called from macro here HaxeToolkit/haxe/lib/haxeui-core/0,0,3/haxe/ui/macros/ComponentMacros.hx:119: characters 24-26 : Unknown identifier : c0 Source/Main.hx:12: characters 19-70 : Called from macro here Source/Main.hx:13: characters 20-29 : Void should be haxe.ui.core.Component Source/Main.hx:13: characters 20-29 : For function argument 'component'

ianharrigan commented 6 years ago

Yeah, it works fine for me either way - any chance you can zip the whole project up and attach it?

jgcop commented 6 years ago

HelloWorld.zip

my version

ianharrigan commented 6 years ago

Its pretty weird, works just fine for me:

image

And the error is really weird to as its at the macro stage...

EDIT: realised im on a crazy out of date openfl (3.6.1 - probably to test haxeui-flixel), let me update

jgcop commented 6 years ago

really? this is my project? i don't understand this

the language ist very nice, haxeui is very nice, but i don't know, what i can do, that it runs without error?

ianharrigan commented 6 years ago

Yeah, thats your project - just opened up the .hxproj and compile / ran, im just updating to latest openfl, maybe that has something to do with it...

What version of haxe are you using?

ianharrigan commented 6 years ago

image

... same thing on openfl 7... :/ Not sure what it could be... very strange error... The project you sent works just fine...

windows 10 haxe 3.4.4 openfl 7 hxcpp git lime 6.0.1

jgcop commented 6 years ago

from all the newest one haxe 3.4.4

hxcpp not from git

ianharrigan commented 6 years ago

Can you do me a favour? Can you try git versions of haxeui-core and haxeui-openfl?

jgcop commented 6 years ago

can you tell me the command? for the git?

ianharrigan commented 6 years ago
haxelib git haxeui-core https://github.com/haxeui/haxeui-core
haxelib git haxeui-openfl https://github.com/haxeui/haxeui-openfl
jgcop commented 6 years ago

it doesn't work the same error i install both from git

my computer is windows 10 pro, i think is not the problem

jgcop commented 6 years ago

could it be, my hxcpp is not from git?

ianharrigan commented 6 years ago

its a super strange error, i wonder if its something to do with the IDE?? What happens if you do:

openfl test windows

from the command line? Does anything else work? eg:

openfl test html5
openfl test neko

?

What about an empty openfl project (no haxeui)?

jgcop commented 6 years ago

λ openfl test neko
C:/laragon/bin/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/ComponentMacros.hx:129: WARNING: no class found for component: tabbar
C:/laragon/bin/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/ComponentMacros.hx:116: characters 24-26 : Unknown identifier : c0
Source/Main.hx:12: characters 19-70 : Called from macro here
C:/laragon/bin/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/ComponentMacros.hx:117: characters 24-26 : Unknown identifier : c0
Source/Main.hx:12: characters 19-70 : Called from macro here
Source/Main.hx:13: characters 20-29 : Void should be haxe.ui.core.Component
Source/Main.hx:13: characters 20-29 : For function argument 'component'

λ openfl test windows
C:/laragon/bin/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/ComponentMacros.hx:129: WARNING: no class found for component: tabbar
C:/laragon/bin/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/ComponentMacros.hx:116: characters 24-26 : Unknown identifier : c0
Source/Main.hx:12: characters 19-70 : Called from macro here
C:/laragon/bin/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/ComponentMacros.hx:117: characters 24-26 : Unknown identifier : c0
Source/Main.hx:12: characters 19-70 : Called from macro here
Source/Main.hx:13: characters 20-29 : Void should be haxe.ui.core.Component
Source/Main.hx:13: characters 20-29 : For function argument 'component'

λ openfl test html5
Warning: Could not generate .eot web font for "C:/laragon/bin/HaxeToolkit/haxe/lib/haxeui-openfl/git/./assets/fonts/Roboto-Regular.ttf"
Warning: Could not generate
.woff web font for "C:/laragon/bin/HaxeToolkit/haxe/lib/haxeui-openfl/git/./assets/fonts/Roboto-Regular.ttf"
Warning: Could not generate *.svg web font for "C:/laragon/bin/HaxeToolkit/haxe/lib/haxeui-openfl/git/./assets/fonts/Roboto-Regular.ttf"
C:/laragon/bin/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/ComponentMacros.hx:129: WARNING: no class found for component: tabbar
C:/laragon/bin/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/ComponentMacros.hx:116: characters 24-26 : Unknown identifier : c0
Source/Main.hx:12: characters 19-70 : Called from macro here
C:/laragon/bin/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/ComponentMacros.hx:117: characters 24-26 : Unknown identifier : c0
Source/Main.hx:12: characters 19-70 : Called from macro here
Source/Main.hx:13: characters 20-29 : Void should be haxe.ui.core.Component
Source/Main.hx:13: characters 20-29 : For function argument 'component'

ianharrigan commented 6 years ago

ok, so this is the issue:

WARNING: no class found for component: tabbar

Now just to figure out why...

ianharrigan commented 6 years ago

... and i know why... its because it its looking for module.xml in haxeui-core, but its set to skip "bin"... but thats just to speed things up - give me a few mins... ill work out a better way to do it.

ianharrigan commented 6 years ago

This is the issue: https://github.com/haxeui/haxeui-core/issues/184

ianharrigan commented 6 years ago

Ok, original issue (184) fixed now (i think) - updated that issue - can you pull latest git versions and retest? Should (hopefully) be working now.

Cheers, Ian

jgcop commented 6 years ago

i'm waiting for the finishing of compiling he stays at src/resources.cpp

jgcop commented 6 years ago

for neko it works fine for html5 it works also fine for windows i try a new compiling, because he stays at scr/ resources .cpp along time

jgcop commented 6 years ago

can you tell me, where i find a good starting point for use haxeui? a good tutorial for beginners, or a good blog for beginners?

i try a new round to compile for windows he stay at the same point a long time for neko and html5 no problems and very fast

i will tell you, if he finished compiling

ianharrigan commented 6 years ago

Sounds like that might be a hxcpp / openfl issue (possibly), compilation is quite fast for me - are you using the IDE or openfl test ...? Also, as far as haxeui2 resources, there arent that many... there is the repo you already found: https://github.com/r3d9u11/haxe-basics/tree/master/4_ExtLib/4.4_GuiFrameworks/4.4.2_HaxeUI

And also: https://github.com/haxeui/component-examples

(The former repo being MUCH fuller :) )

jgcop commented 6 years ago

i using the IDE

jgcop commented 6 years ago

@home it works also for windows

thx for all

if i find new errors, i will open new issues :-D