Neko
Neko apps write to the console window in the same fashion as the C printf function when used
in a Neko ndll module. If used as a web application, the trace output is instead mapped to the
output of the web page.
One point worth remembering is that, should you use the Neko framework in a desktop application and
restrict the command (shell) window from opening, you will be unable to see any trace output
generated by the application.
JavaScript
Outputting a trace value in JavaScript requires a little work. As generated JavaScript code requires a
container HTML page in order to function, it is necessary to add a div or other such tag to the HTML
markup with the id haxe:trace . This then facilitates as an object that the trace output can render to.
< html >
< head >
< title > Trace Output < /title >
< /head >
< body >
< div id=???haxe:trace??? > < /div >
< script type=???text/javascript??? src=???helloworld.js??? > < /script >
< /body >
< /html >
Later you will see how the trace function can be modified so that the output is routed elsewhere ??” to an
alert box, perhaps.
Pages:
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357