[haXe] Enum.toString() ?

Benjamin Dasnois benjamin.dasnois at gmail.com
Sun Apr 9 22:00:59 CEST 2006


Oh ok thanks...maybe you should explain it in "The power of enum" in
the language reference ;)

On 4/9/06, Nicolas Cannasse <ncannasse at motion-twin.com> wrote:
> > 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
>
> --
> haXe - an open source web programming language
> http://haxe.org
>


--
DASNOIS Benjamin



More information about the Haxe mailing list