Promo plaatje


HAXE TRACE TIP

In the book HaXe and Neko the authors speak of using trace with compiling to Flash:

“…the output from a trace function, when used in a Flash application, is written to a Textfield object that is overlaid above the entire movie. The field is scrollable, so if the amount of text gets too long you can scroll through the text to read the part of interest. (page 180)”

Sadly this did not work for me. An email to the HaXe mailinglist and this reply cleared it up:

The information on the book is not accurate on this matter. The text field shows by default the last lines output by trace but no scrollbars will ever appear. This is because the trace function uses a standard TextField object that has not those facilities. You can alway provide your own replacement for the trace function overriding the haxe.Log.trace method. If you are developing for a Flash website and your preferred browser is Firefox; I strongly suggest to redirect you trrace to Firebug using the following simple statement at the beginnig of you application:

if(haxe.Firebug.detect()) haxe.Firebug.redirectTraces();

Thanks to Franco Ponticelli -one of the authors of the HaXe and Neko book- for clearing this up!

ps: This will only work if you’ve installed Firebug on Firefox as far as I know. Open Firebug and check the Firebug console for your traces.

— ♦ —

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>