[haXe] trace not working for me

Roberto Saccon rsaccon at gmail.com
Wed Jan 3 23:58:41 CET 2007


sure, just create a class with something like this:


class FirebugTrace{
  public static function enable() {
    haxe.Log.trace = log;
  }

  private static function log(arg : String)
  {
      var out = "javascript:console.log('FLASH: " + arg + "');";
      flash.Lib.getURL(out);
  }
}


then enable() it, and just continue to use trace as usual, it will output
into the firebug console.

regards
Roberto


On 1/3/07, Hertzel Armengol <hertzel at osc.co.cr> wrote:
>
> maumac wrote:
> > Would you bother showing your test class?
> >
> > Maurício Machado
> >
> > On 1/3/07, Hertzel Armengol <hertzel at osc.co.cr> wrote:
> >> hi :)
> >>
> >> I'm playing a bit with haxe but there's something that is not working
> >> for me and is the famous trace!! (haxe trace)
> >>
> >> if I write this
> >>
> >> trace ("test");
> >>
> >> anywhere in my program and compile the file
> >> using this xhml
> >>
> >> -swf test.swf
> >> -main Test
> >>
> >> the resulting flash don't show anything... what can I do to see the
> >> traces within my browser (IE, firefox)
> >>
> >> tnks
> >>
> >> --
> >> haXe - an open source web programming language
> >> http://haxe.org
> >>
> >
> sure
>
> class Test {
>
> static function main () {
> trace ("test");
> }
>
> }
>
> > If you  are running firefox and firebug, then probably the nicest
> > thing is to rewrite trace so it uses flash.Lib.getURL  and console.log
> > from firebug, then you get all you trace statements on the firebug
> > console.
> >
> > regards
> > Roberto
>
> How can I do that do you have an example? that will help me a lot :)
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>



-- 
Roberto Saccon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/haxe/attachments/20070103/31634949/attachment.htm


More information about the Haxe mailing list