Canvas troubleshooting: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 51: Line 51:
Equally, you can inspect the structure of the whole canvas by using something like this:
Equally, you can inspect the structure of the whole canvas by using something like this:
<syntaxhighlight lang="nasal">
<syntaxhighlight lang="nasal">
debug.dump( myCanvas.getPath() );
props.dump( myCanvas._node );
</syntaxhighlight>
</syntaxhighlight>
The output (shown on the console) will look something like this:
<pre>
texture[2] {NONE} = nil
texture[2]/status {INT} = 1
texture[2]/status-msg {STRING} = Creation pending...
texture[2]/blend-source-rgb {STRING} = src-alpha
texture[2]/view {DOUBLE} = 320
texture[2]/view[1] {DOUBLE} = 160
texture[2]/size {DOUBLE} = 320
texture[2]/size[1] {DOUBLE} = 160
texture[2]/placement {NONE} = nil
texture[2]/placement/type {STRING} = window
texture[2]/placement/id {STRING} = 1
texture[2]/blend-destination-rgb {STRING} = one-minus-src-alpha
texture[2]/blend-source-alpha {STRING} = zero
texture[2]/blend-destination-alpha {STRING} = one
texture[2]/data-focused {LONG} = 1
texture[2]/background {STRING} = rgba(242,241,240,1)
texture[2]/group {NONE} = nil
</pre>


to write the structure of the whole Canvas sub-tree to a file, you can use <code>io.write_properties()</code> like this:
to write the structure of the whole Canvas sub-tree to a file, you can use <code>io.write_properties()</code> like this:

Navigation menu