Prev | Current Page 354 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

Lastly, it
displays the primary item as a string in the TextField .
When writing data to the TextField , the myTrace function constructs a string using the data provided
by the haxe.PosInfos typedef. In the case of the second call to the trace function, bogus information
was sent in a custom object with the haxe.PosInfos signature. This can sometimes prove a valuable
trick when specific data is required within the trace output that is not otherwise forthcoming.
haxe.PosInfos
You ??™ ve now seen how haxe.PosInfos can be used alongside the here identifier when overriding the
available haXe trace functionality. However, it is also possible to use haxe.PosInfos in your own
functions. While here presents detailed data of the location where it is used, haxe.PosInfos will
provide the same data about the location where its containing function was called, providing the haxe
.PosInfos is used as an unpopulated optional parameter for that function. This is important, as passing
null for this parameter will provide undefined data.


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