Targeting Android problem ..

117 views
Skip to first unread message

Samir Sabri

unread,
Feb 4, 2013, 5:33:56 AM2/4/13
to haxe...@googlegroups.com
I just checked out the haxe version of the GUI framework of ASWing, if I target flash player in FlashDevelop, it will compile with no errors, but if I target android, I get error:

Field xxxx should be declared with 'override' since it is inherited from superclass

Here is the errors:

org/aswing/AWTextField.hx:58: lines 58-63 : Field set_htmlText should be declared with 'override' since it is inherited from superclass
org/aswing/AWTextField.hx:76: lines 76-83 : Field set_scrollH should be declared with 'override' since it is inherited from superclass
org/aswing/AWTextField.hx:85: lines 85-92 : Field set_scrollV should be declared with 'override' since it is inherited from superclass
org/aswing/AWTextField.hx:68: lines 68-73 : Field set_text should be declared with 'override' since it is inherited from superclass

org/aswing/Component.hx:1671: lines 1671-1673 : Field get_height should be declared with 'override' since it is inherited from superclass
org/aswing/Component.hx:641: lines 641-643 : Field get_visible should be declared with 'override' since it is inherited from superclass

Any idea? what could be wrong?

Joshua Granick

unread,
Feb 4, 2013, 7:34:34 PM2/4/13
to haxe...@googlegroups.com
It sounds like either the child class needs to have the "set_htmlText" (etc) methods removed, because they are inherited, or it needs to have "override" added next to them. Then I think it should work
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haxelang+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



Samir Sabri

unread,
Feb 5, 2013, 12:53:12 AM2/5/13
to haxe...@googlegroups.com
But, as I have checked out the framework from the repo, didn't any one fix this problem before?
Also, is there any news regarding the HTML5 targeted version on ASWing?

Thanks
--
--
Kind Regards,
--------------------------------------------- 
Samir Sabri
Software Architect& Developer
Jordan-Middle East

Samir Sabri

unread,
Feb 5, 2013, 1:10:16 AM2/5/13
to haxe...@googlegroups.com
I tried to remove them, then I got this error:

C:\Motion-Twin\haxe\lib\hxcpp\2,10,3\include\hx/Object.h(198): could be 'bool hx::ObjectPtr<OBJ_>::operator ==(const hx::ObjectPtr<OBJ_> &) const'
c:\motion-twin\haxe\lib\hxcpp\2,10,3\include\Dynamic.h(262): or       'bool operator ==(const String &,const Dynamic &)'

What I am wondering, has any one used ASWing for android so far? or I am the first one ? :-)

Joshua Granick

unread,
Feb 5, 2013, 1:20:39 PM2/5/13
to haxe...@googlegroups.com
Try and download this version:




Once it is downloaded, run "haxelib test hxcpp-2.10.3.zip" to install it

I believe this operator issue was resolved in the copy of HXCPP we are using right now


I'm not sure what the current status of ASWing is... I haven't heard much in a while, though it may be close enough to working?

Samir Sabri

unread,
Feb 5, 2013, 3:00:11 PM2/5/13
to haxe...@googlegroups.com
I posted a post at ASWing discussion group but I didn't hear back from any one ,, I don't know ..
I will try http://www.nme.io/builds/hxcpp-2.10.3.zip and respond back, thanks for quick response! :-)

simo

unread,
Feb 6, 2013, 1:20:10 AM2/6/13
to haxe...@googlegroups.com
I have tried to "haxelib test hxcpp-2.10.3.zip", I still have errors, here is the build output:

Running process: C:\Program Files (x86)\FlashDevelop\Tools\fdbuild\fdbuild.exe "C:\test_haxe\src\AswingNme.hxproj" -ipc 4e67b951-8678-451e-a466-7fa7621f0085 -version "2.10" -compiler "C:\Motion-Twin\Haxe" -library "C:\Program Files (x86)\FlashDevelop\Library"
Building AswingNme
haxe --connect 6000 -cp src -cpp bin -main Main -lib nme -lib hxcpp --remap flash:nme --remap neko:cpp -debug
haxelib run hxcpp Build.xml haxe -Ddebug -Dcpp -Ddebug -Dhaxe_208 -Dhaxe_209 -Dhaxe_210 -Dhxcpp -Dnme -Dsys -Dtrue
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
Creating obj/mscv16-debug/__pch/haxe/hxcpp.pch...
cl.exe -Iinclude -nologo -Od -DHX_WINDOWS -GR -Zi -Oy- -c -EHs -IC:\Motion-Twin\haxe\lib\hxcpp\2,10,3//include -DHXCPP_DEBUG -DHXCPP_VISIT_ALLOCS -Dhaxe_210 -D_CRT_SECURE_NO_DEPRECATE -wd4996 -MT -Ychxcpp.h obj/mscv16-debug/__pch/haxe/hxcpp.cpp /Fpobj/mscv16-debug/__pch/haxe/hxcpp.pch -Foobj/mscv16-debug/__pch/haxe/hxcpp.obj
hxcpp.cpp
cl.exe -Iinclude -nologo -Od -DHX_WINDOWS -GR -Zi -Oy- -c -EHs -IC:\Motion-Twin\haxe\lib\hxcpp\2,10,3//include -DHXCPP_DEBUG -DHXCPP_VISIT_ALLOCS -Dhaxe_210 -D_CRT_SECURE_NO_DEPRECATE -wd4996 -MT -Yuhxcpp.h /Fpobj/mscv16-debug/__pch/haxe/hxcpp.pch ./src/org/aswing/Container.cpp -Foobj/mscv16-debug/src/org/aswing/Container.obj
cl.exe -Iinclude -nologo -Od -DHX_WINDOWS -GR -Zi -Oy- -c -EHs -IC:\Motion-Twin\haxe\lib\hxcpp\2,10,3//include -DHXCPP_DEBUG -DHXCPP_VISIT_ALLOCS -Dhaxe_210 -D_CRT_SECURE_NO_DEPRECATE -wd4996 -MT -Yuhxcpp.h /Fpobj/mscv16-debug/__pch/haxe/hxcpp.pch ./src/org/aswing/Component.cpp -Foobj/mscv16-debug/src/org/aswing/Component.obj
cl.exe -Iinclude -nologo -Od -DHX_WINDOWS -GR -Zi -Oy- -c -EHs -IC:\Motion-Twin\haxe\lib\hxcpp\2,10,3//include -DHXCPP_DEBUG -DHXCPP_VISIT_ALLOCS -Dhaxe_210 -D_CRT_SECURE_NO_DEPRECATE -wd4996 -MT -Yuhxcpp.h /Fpobj/mscv16-debug/__pch/haxe/hxcpp.pch ./src/org/aswing/graphics/SolidBrush.cpp -Foobj/mscv16-debug/src/org/aswing/graphics/SolidBrush.obj
cl.exe -Iinclude -nologo -Od -DHX_WINDOWS -GR -Zi -Oy- -c -EHs -IC:\Motion-Twin\haxe\lib\hxcpp\2,10,3//include -DHXCPP_DEBUG -DHXCPP_VISIT_ALLOCS -Dhaxe_210 -D_CRT_SECURE_NO_DEPRECATE -wd4996 -MT -Yuhxcpp.h /Fpobj/mscv16-debug/__pch/haxe/hxcpp.pch ./src/org/aswing/graphics/IBrush.cpp -Foobj/mscv16-debug/src/org/aswing/graphics/IBrush.obj
IBrush.cpp
SolidBrush.cpp
Component.cpp
Container.cpp
./src/org/aswing/Container.cpp(306) : error C2666: 'hx::ObjectPtr<OBJ_>::operator ==' : 2 overloads have similar conversions
        with
        [
            OBJ_=org::aswing::Component_obj
        ]
        C:\Motion-Twin\haxe\lib\hxcpp\2,10,3\include\hx/Object.h(198): could be 'bool hx::ObjectPtr<OBJ_>::operator ==(const hx::ObjectPtr<OBJ_> &) const'
        with
        [
            OBJ_=org::aswing::Component_obj
        ]
        c:\motion-twin\haxe\lib\hxcpp\2,10,3\include\Dynamic.h(262): or       'bool operator ==(const String &,const Dynamic &)'
        while trying to match the argument list '(org::aswing::Component, Dynamic)'
Fatal error: exception Unix.Unix_error(56, "recv", "")
Build halted with errors (haxe.exe).

I really need a support in this, I am very interested in NME project.
Thanks very much
simo

Joshua Granick

unread,
Feb 6, 2013, 1:28:01 AM2/6/13
to haxe...@googlegroups.com
Hmm,

I have only seen this problem very rarely.

For now, you should likely be able to fix the problem by using an explicit cast. For example, a line like....


objects.get ("my-object") == object


... replaced with:


objects.get ("my-object") == cast (object, Sprite)


It's a pain, but like I said this is rare. Try and find the generated CPP file, under the "obj" directory of the output target. It should match the original class name, and it should show in the source what line number of the Haxe code it came from

simo

unread,
Feb 6, 2013, 1:51:26 AM2/6/13
to haxe...@googlegroups.com
I will try to see which line, it seems that I will get my hands dirty now .. : )

Hugh

unread,
Feb 6, 2013, 11:25:15 PM2/6/13
to haxe...@googlegroups.com
Also, reversing the order of the comparison helps:  a==b -> b==a

The SVN version of HXCPP should have this fixed.

Hugh
Reply all
Reply to author
Forward
0 new messages