[haXe] Enum.toString() ?

Nicolas Cannasse ncannasse at motion-twin.com
Sun Apr 9 22:00:40 CEST 2006


> Hi,
> are you sure you've added Enum.toString?
> In my code nBorder is a haXeGTK.BorderStyle which is an Enum... (enum
> BorderStyle {})
> The compiler complains about this line:
> this.rootNode.style.borderStyle = nBorderStyle.toString();
>  with this error: haXeGTK.borderStyle have no field toString

Well you can't call .toString() on an enum. However
Std.string(nBorderStyle) will work.

Nicolas



More information about the Haxe mailing list