Prev | Current Page 346 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


181
Chapter 7: When Things Go Wrong
haXe Trace versus ActionScript Trace
You ActionScript folk might be itching to skip this section and move on to exception handling, but it is
recommended that you spare just a little time reading this chapter thoroughly. There is much more to
tracing in haXe than in ActionScript that extends beyond the output panel.
In ActionScript, the trace function was really quite simple and limiting. So, you can pass a string to an
output window. Big deal. Sure, this is kind of an invaluable feature, but in all of the past eight versions of
Flash using the original ActionScript Virtual Machine, it hasn ??™ t evolved enough to provide some other
basic features that lend themselves well to finding those troublesome bugs without having to result to
stepping into the code. Thankfully, however, Nicolas Cannasse has addressed this issue nicely, and has
given pretty much all the functionality one could want in a trace function. For a start, you ??™ re no longer
left guessing where your trace output is coming from, as each trace response is decorated with the
associated class name and line number of the trace call.


Pages:
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358