Updates

21 views
Skip to first unread message

Don-Duong Quach

unread,
Oct 30, 2008, 3:31:51 PM10/30/08
to as3tohaxe
Hey gang,

The as3tohaxe source and binaries have been updated.

Changes:
Added command line option (--intnum) to convert :Number to :Int, by
default they're converted to :Float
Added commas between extends and implements and repeats implements for
multiple interfaces
Convert "interface extends" to implements
Convert classes with "dynamic" namespace to "implements
Dynamic<Dynamic>"
Removed "extends Object"

"as3tohaxe ClassExtendsImplements.as" on :
package {
public class ClassExtendsImplements extends A implements B, C {
public function ClassExtendsImplements(){
}
}

dynamic internal class ZClass extends Object {
public function ZClass() {
}
}
}

generates:

class ClassExtendsImplements extends A, implements B, implements C {
static function main() {
}
}

private class ZClass implements Dynamic<Dynamic> {
public function new() {
}
}

"as3haxe IInterfaceExtends.as --intnum" on:

package test {
public interface IInterfaceExtends extends IA {
function doSomething(a:Number):Number;
}
}

generates:

package test;

interface IInterfaceExtends implements IA{
function doSomething(a:Int):Int;
}


Let me know if you have any issues with the changes.
-Don Q.

Brent Pedersen

unread,
Nov 2, 2008, 4:06:10 PM11/2/08
to as3t...@googlegroups.com
i havent looked much, but seems ok. just a heads up. i also had to
cabal install regex-compat
using the ghc in ubuntu 8.10.
-b

Brent Pedersen

unread,
Nov 2, 2008, 4:42:40 PM11/2/08
to as3t...@googlegroups.com
hi don, i just tried as3tohaxe on openflashchart and found some more issues:
they use for each like this:
>>> for each ( var v:String in p )
i believe that's supposed be translated to:
>>> for(v in p)
or
>>> var v:String;
>>> for(v in p)

then, openflashchart uses lower case names for classes/files:
main.as with class main
you currently change that to main.hx with class main, but
haxe requires Main.hx with class Main


hope that helps.
-brent

Don-Duong Quach

unread,
Nov 3, 2008, 2:43:22 PM11/3/08
to as3t...@googlegroups.com
Hey Brent,

I'll look into converting "for each" and "for in" sooner than later then.  As for the lowercase class names, I've encountered that as well.  I guess I can just make them uppercase, and if you run into an namespace collision, it'll be up to you to resolve it.

Thanks for checking.
-Don Q.

Brent Pedersen

unread,
Nov 3, 2008, 4:22:03 PM11/3/08
to as3t...@googlegroups.com
great!
for loops seems to be the most common problem now.
after that, it's the object Reflect stuff.
thanks,
-b
Reply all
Reply to author
Forward
0 new messages