new --gen-hx-classes too verbose to work

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

new --gen-hx-classes too verbose to work

justin_mills
 Hi

trying to get our project working with the most recent build.  In the nightly there was a bitmapData import missing but it was already reported.  However having problems getting --gen-hx-classes working for our setup.

haxe -swf-lib D:\asset\in.swf --gen-hx-classes --no-output -swf-version 10 -swf output.swf

This seems a bit on the long side compared with the past, but it seems to be generating packages which were not generated before - standard flash and haxe classes which seem to only cause problems.

So to get a running application I have to go through hxclasses and manually delete these files and they are muddled in with my as3 classes so it's tricky ( really only using as3 classes for some textfield timeline population trickery mostly I avoid them but there are a lot so like needle in a haystack  ), we are loading several swf into the same domain at runtime rather than compiling in the main code build.

So obviously the simplest solution is to rename the previous haxe.exe to  generateHaxe.exe and use that for generating stubs, I gather others are prefering the old haxe for gen so maybe it is currently the best approach.  But maybe I am missing a trick is there a command switch that I need to add to create a less verbose hxclasses that will work with the project, or someone has made a macro to do this if needed !?

Many thanks


Justin


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

Re: new --gen-hx-classes too verbose to work

Nicolas Cannasse
Le 01/04/2011 16:10, [hidden email] a écrit :

>   Hi
>
> trying to get our project working with the most recent build.  In the nightly there was a bitmapData import missing but it was already reported.  However having problems getting --gen-hx-classes working for our setup.
>
> haxe -swf-lib D:\asset\in.swf --gen-hx-classes --no-output -swf-version 10 -swf output.swf
>
> This seems a bit on the long side compared with the past, but it seems to be generating packages which were not generated before - standard flash and haxe classes which seem to only cause problems.
>
> So to get a running application I have to go through hxclasses and manually delete these files and they are muddled in with my as3 classes so it's tricky ( really only using as3 classes for some textfield timeline population trickery mostly I avoid them but there are a lot so like needle in a haystack  ), we are loading several swf into the same domain at runtime rather than compiling in the main code build.
>
> So obviously the simplest solution is to rename the previous haxe.exe to  generateHaxe.exe and use that for generating stubs, I gather others are prefering the old haxe for gen so maybe it is currently the best approach.  But maybe I am missing a trick is there a command switch that I need to add to create a less verbose hxclasses that will work with the project, or someone has made a macro to do this if needed !?

In most of the cases you should not have to generate hx classes anymore,
simply using -swf-lib will allow you to access types declared into the SWF.

Nicolas

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

Re: new --gen-hx-classes too verbose to work

Jan_Flanders
On 4/1/11, Nicolas Cannasse <[hidden email]> wrote:
>
> In most of the cases you should not have to generate hx classes anymore,
> simply using -swf-lib will allow you to access types declared into the SWF.
>
> Nicolas
>
>

For me it works in some cases without the hxclasses, which is great
and comes close to swc support. But it mostly fails for various
reasons depending on the swf's I'm feeding it with -swf-lib.
I still use an older haxe version to generate the hxclasses and copy
those over to my current project. The problems causing --gen-hx to
fail in 2.07 have never seemed to be a problem at runtime. An example
of a failing -swf-lib is attached.

Jan

--
haXe - an open source web programming language
http://haxe.org

gen-bug.zip (189K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: new --gen-hx-classes too verbose to work

Fei Yin
The --gen-hx-classes prarameter is very important that when I using a
external swf library with a lots of classes , and there may no
document of it , or maybe it just a flash graphic resource lib with
lots of symbols with class name binding in library build from adobe
flash software by a designer , I can get the usable symbol list using
--gen-hx-classes .

And another important thing , is sometimes I want to know my haXe
output swf file is correct or not when debugging , so I just want to
get the class list of it . But when I do this , it show me a error :

$ haxe -swf-lib hello.swf --gen-hx-classes --no-output -swf-version 10
-swf foo.swf
hello.swf@Void:1: character 0 : Type name Void is redefined from module StdTypes

This hello.swf is just a simple Hello world build by haXe 2.07 . But I
can't understand why it can not re-generate haXe classes .
----
Best regards

Yin Fei

>From Icebirds.net



2011/4/2 Jan Flanders <[hidden email]>:

> On 4/1/11, Nicolas Cannasse <[hidden email]> wrote:
>>
>> In most of the cases you should not have to generate hx classes anymore,
>> simply using -swf-lib will allow you to access types declared into the SWF.
>>
>> Nicolas
>>
>>
>
> For me it works in some cases without the hxclasses, which is great
> and comes close to swc support. But it mostly fails for various
> reasons depending on the swf's I'm feeding it with -swf-lib.
> I still use an older haxe version to generate the hxclasses and copy
> those over to my current project. The problems causing --gen-hx to
> fail in 2.07 have never seemed to be a problem at runtime. An example
> of a failing -swf-lib is attached.
>
> Jan
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org