[haXe] best strategy to port an existing js library
Franco Ponticelli
franco.ponticelli at gmail.com
Fri Dec 7 19:48:38 CET 2007
Ok, that makes perfect sense ;-)
On Dec 7, 2007 5:40 PM, Danny Wilson <danny at decube.net> wrote:
>
> > /** Static call **/
> > public static function niceAlert(txt:String):Void = untyped
> > __js__("niceAlert");
> >
> Wow what just happened, that's not even possible :D
>
>
> This will:
>
> class MyWrappingClass
> {
> static function __init__()
> {
> untyped MyWrappingClass.niceAlert = __js__("niceAlert");
> }
>
> /** Static call **/
> public static function niceAlert(txt:String):Void;
>
> }
>
> ofcourse you can wrap it in:
>
> static var niceAlert : Void->Void;
>
> But then you won't get any argument names when it's autocompleted, and the
> generated haxedoc will be less nice :-)
>
>
> Kind regards,
>
> Danny Wilson
>
>
> deCube.net - http://decube.net/
> web application design and development
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/haxe/attachments/20071207/feea04dc/attachment.htm
More information about the Haxe
mailing list