Prev | Current Page 356 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

This
function is not always usable, however, especially if you opt to create your own trace handler. The
clear function, on the other hand, is used when you wish to purge the trace output, and is invaluable
when using the trace function substantially.
185
Chapter 7: When Things Go Wrong
To Trace or not to Trace
The trace function is pretty flexible, especially when compared to the current offering as supplied by
the Flash IDE. However, there is little supplied that couldn ??™ t be packaged up in your own classes. So
why use the haXe trace function at all? Well, why not? would be one argument. After all, it certainly is
usable, and there is no point in reinventing the wheel. However, there is another feature that makes the
trace function near perfect. The - - no - traces compiler switch.
Suppose you ??™ ve created a large haXe application that used your own debugging framework extensively,
which involved writing data to the screen. Now, you want to output a final version of this application for
deployment.


Pages:
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368