Error in as3 generation for Date?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Error in as3 generation for Date?

Dinkar Ganti

Is there an error in generating as3 code correctly for
import mx.core.Container;
import mx.controls.Label;
class DateUtilTests {
  public function new(aContainer : Container) {
    try {
    var date =;
    var label = new Label();
    label.text = "The date " + Std.string(date);
    }catch(err : Dynamic) {
      var errorLabel = new Label();
      errorLabel.text = "There is an error " + Std.string(err);

The above code returns type error : #1006. I am compiling this code
using Haxe Compiler 2.0 and generating as3 code. Is there a conflict between
the flex's default date and haxe's date. Is there a workaround that I
could use?


haXe - an open source web programming language

dinkar_ganti.vcf (202 bytes) Download Attachment