Prev | Current Page 352 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

..??? );
}
public static function myTrace( v : Dynamic, ?pos : haxe.PosInfos ) : Void
{
var f : flash.MovieClip = flash.Lib.current;
if ( !Std.is(f.__txtField__, flash.TextField ) )
{
f.createTextField( ???__txtField__???, 9999, 0, 0, flash.Stage.width,
flash.Stage.height );
}
for ( i in pos.customParams )
{
f.__txtField__.text += pos.fileName + ???- > ??? + pos.className + ???- > ??? +
pos.methodName + ???- > line(??? + pos.lineNumber + ???) : ??? + i + ???\n???;
}
f.__txtField__.text += pos.fileName + ???- > ??? + pos.className + ???- > ???
+ pos.methodName + ???- > line(??? + pos.lineNumber + ???) : ??? + v + ???\n???;
}
}
Having compiled and run this code for the Flash platform, you should now find that, when calling the
trace function, you are provided with more data about the location of the trace calls. Of course, a
couple of these lines are bogus, but they do provide you with an overview of the amount of power you
have over how these function calls are treated.
Here is what you should see when you run the preceding code in Flash:
TraceHandler.


Pages:
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364