Prev | Current Page 350 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

They each represent the filename, line
number, class name, and method name, in that order, of the location where the trace function is called.
By submitting a replacement for this object, it is possible to exchange the values of these properties for
your own values, though quite frankly; it is hard to see a valid need beyond custom formatting.
The last available property of the PosInfos typedef represents any other parameters you want passed to
the function. For example, perhaps you want to pass a flag that notifies your custom trace function of
where you want the output to be directed.
here
When you submit a call to the standard trace function, you are omitting the second optional parameter
present in the haxe.Log.trace function signature. However, the data required by the lower level
trace function that is normally supplied by this parameter is actually still passed via an identifier called
here . This identifier is a representation of the haxe.PosInfos typedef, and provides information
pertaining to the exact point in your code that the identifier is used.


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