Haxe + AsWing + NME

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Haxe + AsWing + NME

Nicolas Dierick
Hello,

I'm trying to compile an application using ASWing with NME,

Building for flash with command : haxelib run nme test Main.nmml flash
everything is ok,

but for windows application with command : haxelib run nme test
Main.nmml windows
i have some errors :

C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/Component.hx:21:
characters 1-36 : Class not found : flash.utils.TypedDictionary
C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/Insets.hx:102: characters
17-29 : nme.#Lib has no field as
C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/geom/IntRectangle.hx:191:
characters 23-35 : nme.#Lib has no field as
C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/geom/IntDimension.hx:117:
characters 23-35 : nme.#Lib has no field as
C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/geom/IntPoint.hx:131:
characters 27-39 : nme.#Lib has no field as
C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/util/StringUtils.hx:18:
characters 10-22 : nme.#Lib has no field as
C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/util/StringUtils.hx:88:
characters 4-39 : Class not found : UInt
Called from ? line 1
Called from InstallTool.hx line 384
Called from InstallTool.hx line 70
Called from installers/InstallerBase.hx line 102
Called from installers/DesktopInstaller.hx line 88
Called from installers/InstallerBase.hx line 878
Called from InstallTool.hx line 205
Uncaught exception - Error running: haxe bin/cpp/windows/haxe/release.hxml


Is there any way to build applications using AsWing with NME ?

on AsWing website, it seems possible :)
http://www.aswing.org/?p=405

Thanks !
NicoD

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Haxe + AsWing + NME

sledorze
Looks like flash.utils.TypedDictionnary is not part of NME..

Does NME is supposed to provide all flash API or a subset?
In the later case then, some work would be required to make some libraries NME friendly..

If it's true then some parts of ASwing may not be used.
Does anyone has feedback to provide regarding this? (or an alternative fully featured Gui api)

Stephane
Reply | Threaded
Open this post in threaded view
|

Re: Haxe + AsWing + NME

singmajesty
If you look at http://www.haxe.org/api, you will see that TypedDictionary  
is available to flash9 but not any other Haxe target.

Theoretically, it might be possible to create an alternative for C++ in  
NME, but it might also make (better?) sense for the library to use an API  
that is already cross-platform.

If the key value can be a string or an integer, Hash and IntHash work for  
all targets (to my knowledge), or if the key needs to be an object, it is  
maybe possible to do something like the ObjectHash class I created for  
Actuate, which uses either a Dictionary on Flash, or uses object IDs to  
map objects to an IntHash internally. It isn't perfect, but it works for  
Actuate.



On Wed, 28 Sep 2011 23:45:37 -0700, sledorze <[hidden email]>  
wrote:

> Looks like flash.utils.TypedDictionnary is not part of NME..
>
> Does NME is supposed to provide all flash API or a subset?
> In the later case then, some work would be required to make some  
> libraries
> NME friendly..
>
> If it's true then some parts of ASwing may not be used.
> Does anyone has feedback to provide regarding this? (or an alternative  
> fully
> featured Gui api)
>
> Stephane
>
>
> --
> View this message in context:  
> http://haxe.1354130.n2.nabble.com/Haxe-AsWing-NME-tp6841999p6842901.html
> Sent from the Haxe mailing list archive at Nabble.com.

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Haxe + AsWing + NME

Nicolas Dierick
Hello,

thank you for your help

it means that there's still some libraries missing
is there any plan to add this libraries in a near future ? :)

thanks



Le 29/09/2011 19:55, Joshua Granick a écrit :

> If you look at http://www.haxe.org/api, you will see that
> TypedDictionary is available to flash9 but not any other Haxe target.
>
> Theoretically, it might be possible to create an alternative for C++
> in NME, but it might also make (better?) sense for the library to use
> an API that is already cross-platform.
>
> If the key value can be a string or an integer, Hash and IntHash work
> for all targets (to my knowledge), or if the key needs to be an
> object, it is maybe possible to do something like the ObjectHash class
> I created for Actuate, which uses either a Dictionary on Flash, or
> uses object IDs to map objects to an IntHash internally. It isn't
> perfect, but it works for Actuate.
>
>
>
> On Wed, 28 Sep 2011 23:45:37 -0700, sledorze
> <[hidden email]> wrote:
>
>> Looks like flash.utils.TypedDictionnary is not part of NME..
>>
>> Does NME is supposed to provide all flash API or a subset?
>> In the later case then, some work would be required to make some
>> libraries
>> NME friendly..
>>
>> If it's true then some parts of ASwing may not be used.
>> Does anyone has feedback to provide regarding this? (or an
>> alternative fully
>> featured Gui api)
>>
>> Stephane
>>
>>
>> --
>> View this message in context:
>> http://haxe.1354130.n2.nabble.com/Haxe-AsWing-NME-tp6841999p6842901.html
>> Sent from the Haxe mailing list archive at Nabble.com.
>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Haxe + AsWing + NME

singmajesty
Okay, let's see...


C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/Insets.hx:102: characters  
17-29 : nme.#Lib has no field as
C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/geom/IntRectangle.hx:191:  
characters 23-35 : nme.#Lib has no field as
C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/geom/IntDimension.hx:117:  
characters 23-35 : nme.#Lib has no field as
C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/geom/IntPoint.hx:131:  
characters 27-39 : nme.#Lib has no field as
C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/util/StringUtils.hx:18:  
characters 10-22 : nme.#Lib has no field as
C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/util/StringUtils.hx:88:  
characters 4-39 : Class not found : UInt



You should be able to use "cast" instead of "as":


var sprite:Sprite = cast (displayObject, Sprite);




You should be able to use Int instead of UInt, or if it is an issue, you  
can use conditional statements


#if flash
private var value:UInt;
#else
private var value:Int;
#end



On Thu, 29 Sep 2011 14:40:28 -0700, Nicolas Dierick  
<[hidden email]> wrote:

> Hello,
>
> thank you for your help
>
> it means that there's still some libraries missing
> is there any plan to add this libraries in a near future ? :)
>
> thanks
>
>
>
> Le 29/09/2011 19:55, Joshua Granick a écrit :
>> If you look at http://www.haxe.org/api, you will see that  
>> TypedDictionary is available to flash9 but not any other Haxe target.
>>
>> Theoretically, it might be possible to create an alternative for C++ in  
>> NME, but it might also make (better?) sense for the library to use an  
>> API that is already cross-platform.
>>
>> If the key value can be a string or an integer, Hash and IntHash work  
>> for all targets (to my knowledge), or if the key needs to be an object,  
>> it is maybe possible to do something like the ObjectHash class I  
>> created for Actuate, which uses either a Dictionary on Flash, or uses  
>> object IDs to map objects to an IntHash internally. It isn't perfect,  
>> but it works for Actuate.
>>
>>
>>
>> On Wed, 28 Sep 2011 23:45:37 -0700, sledorze  
>> <[hidden email]> wrote:
>>
>>> Looks like flash.utils.TypedDictionnary is not part of NME..
>>>
>>> Does NME is supposed to provide all flash API or a subset?
>>> In the later case then, some work would be required to make some  
>>> libraries
>>> NME friendly..
>>>
>>> If it's true then some parts of ASwing may not be used.
>>> Does anyone has feedback to provide regarding this? (or an alternative  
>>> fully
>>> featured Gui api)
>>>
>>> Stephane
>>>
>>>
>>> -- View this message in context:  
>>> http://haxe.1354130.n2.nabble.com/Haxe-AsWing-NME-tp6841999p6842901.html
>>> Sent from the Haxe mailing list archive at Nabble.com.
>>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Haxe + AsWing + NME

Nicolas Dierick
Hello,

Ok thank you
i modify "as" to "cast", "UInt" to "Int", and change TypedDictionary to
ObjectHash when it's not Flash.

But now i have other problem
C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/event/FocusKeyEvent.hx:10:
characters 0-28 : Class not found : flash.ui.KeyLocation

I think there will be a lot of other similar problems...

Is there any AsWing alternative ?
we told me about GM2D
Is it working for crossplateform compil ?

If i want to build application + GUI , is there any API ?

Thanks


Le 30/09/2011 00:42, Joshua Granick a écrit :

> Okay, let's see...
>
>
> C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/Insets.hx:102:
> characters 17-29 : nme.#Lib has no field as
> C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/geom/IntRectangle.hx:191: characters
> 23-35 : nme.#Lib has no field as
> C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/geom/IntDimension.hx:117: characters
> 23-35 : nme.#Lib has no field as
> C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/geom/IntPoint.hx:131:
> characters 27-39 : nme.#Lib has no field as
> C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/util/StringUtils.hx:18:
> characters 10-22 : nme.#Lib has no field as
> C:\Motion-Twin\haxe\lib\aswing/1,0/org/aswing/util/StringUtils.hx:88:
> characters 4-39 : Class not found : UInt
>
>
>
> You should be able to use "cast" instead of "as":
>
>
> var sprite:Sprite = cast (displayObject, Sprite);
>
>
>
>
> You should be able to use Int instead of UInt, or if it is an issue,
> you can use conditional statements
>
>
> #if flash
> private var value:UInt;
> #else
> private var value:Int;
> #end
>
>
>
> On Thu, 29 Sep 2011 14:40:28 -0700, Nicolas Dierick
> <[hidden email]> wrote:
>
>> Hello,
>>
>> thank you for your help
>>
>> it means that there's still some libraries missing
>> is there any plan to add this libraries in a near future ? :)
>>
>> thanks
>>
>>
>>
>> Le 29/09/2011 19:55, Joshua Granick a écrit :
>>> If you look at http://www.haxe.org/api, you will see that
>>> TypedDictionary is available to flash9 but not any other Haxe target.
>>>
>>> Theoretically, it might be possible to create an alternative for C++
>>> in NME, but it might also make (better?) sense for the library to
>>> use an API that is already cross-platform.
>>>
>>> If the key value can be a string or an integer, Hash and IntHash
>>> work for all targets (to my knowledge), or if the key needs to be an
>>> object, it is maybe possible to do something like the ObjectHash
>>> class I created for Actuate, which uses either a Dictionary on
>>> Flash, or uses object IDs to map objects to an IntHash internally.
>>> It isn't perfect, but it works for Actuate.
>>>
>>>
>>>
>>> On Wed, 28 Sep 2011 23:45:37 -0700, sledorze
>>> <[hidden email]> wrote:
>>>
>>>> Looks like flash.utils.TypedDictionnary is not part of NME..
>>>>
>>>> Does NME is supposed to provide all flash API or a subset?
>>>> In the later case then, some work would be required to make some
>>>> libraries
>>>> NME friendly..
>>>>
>>>> If it's true then some parts of ASwing may not be used.
>>>> Does anyone has feedback to provide regarding this? (or an
>>>> alternative fully
>>>> featured Gui api)
>>>>
>>>> Stephane
>>>>
>>>>
>>>> -- View this message in context:
>>>> http://haxe.1354130.n2.nabble.com/Haxe-AsWing-NME-tp6841999p6842901.html 
>>>>
>>>> Sent from the Haxe mailing list archive at Nabble.com.
>>>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Haxe + AsWing + NME

rammserker
Haxegui: ( http://code.google.com/p/haxegui/ )
Minimalcomps: ( https://github.com/slaskis/minimalcomps )

The problem with them: These libraries aren't cross platform... But I use a modified version of minimalcomps in CPP/NME and JS aswell. It's not a difficult task to make it cross platform.

Max
0 1 0 | 0 0 1 | 1 1 1



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Haxe + AsWing + NME

Nicolas Dierick
Hello,

ok thank you

i will test them



Le 30/09/2011 21:15, Maximiliano Fernández a écrit :
Haxegui: ( http://code.google.com/p/haxegui/ )
Minimalcomps: ( https://github.com/slaskis/minimalcomps )

The problem with them: These libraries aren't cross platform... But I use a modified version of minimalcomps in CPP/NME and JS aswell. It's not a difficult task to make it cross platform.

Max
0 1 0 | 0 0 1 | 1 1 1



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Haxe + AsWing + NME

go2ghana
Am 03.10.2011 09:43, schrieb Nicolas Dierick:

> Hello,
>
> ok thank you
>
> i will test them
>
>
>
> Le 30/09/2011 21:15, Maximiliano Fernández a écrit :
>> Haxegui: (
>> http://code.google.com/p/*haxegui*/<http://code.google.com/p/haxegui/> )
>> Minimalcomps: ( https://github.com/slaskis/minimalcomps )
>>
>> The problem with them: These libraries aren't cross platform... But I
>> use a modified version of minimalcomps in CPP/NME and JS aswell. It's
>> not a difficult task to make it cross platform.
>>
Hi Max,
would you mind to share your modified JS version and a usage example?

Cordially,
Axel
>> Max
>> 0 1 0 | 0 0 1 | 1 1 1
>>
>>
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Haxe + AsWing + NME

rammserker
Right now I don't have access, but I can share it. I would make a new "minimalcomps for haXe" project, but my code in this moment is ugly and I only made cross-platform a couple of components. When I clean the code, I will share it ;)

For now, when I arrive home, I can share it with you.

Max
0 1 0 | 0 0 1 | 1 1 1



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Haxe + AsWing + NME

Nicolas Dierick
Okay
Thank you
:)

Le 03/10/2011 20:25, Maximiliano Fernández a écrit :
Right now I don't have access, but I can share it. I would make a new "minimalcomps for haXe" project, but my code in this moment is ugly and I only made cross-platform a couple of components. When I clean the code, I will share it ;)

For now, when I arrive home, I can share it with you.

Max
0 1 0 | 0 0 1 | 1 1 1





--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Haxe + AsWing + NME

cambiata
Hi guys!

There's https://github.com/Beeblerox/MinimalCompsHX, a MinimalComps port that seems to work on both flash and cpp targets (some restrictions on cpp still)

I've just added a GUI Toolkits page on the wiki (http://haxe.org/doc/libraries/gui). Please add what you know about GUI solutions, so that we can get a good overview.

Jonas
Reply | Threaded
Open this post in threaded view
|

Re: Haxe + AsWing + NME

paling
In reply to this post by sledorze