These appear to be undocumented:

The runtime you compile for will be represented as:

$swf7
$swf8
$dhtml

which can be used to control runtime-specific features. These are used in the implementation of the OpenLaszlo Runtime. In LZX code you would use the <switch> tag (http://www.openlaszlo.org/lps4/docs/ guide/compiler.html#d0e32965).

On 2007-05-08, at 18:01 EDT, Jean-Baptiste BRIAUD wrote:

It works !
Thanks.

Are there others magic variable like $debug ?

JBB.

P T Withington wrote:
The debug attribute of the canvas is magic. It enables debugging in the same way that ?debug=true does on the request url. If you want to know if debugging is on, the compiler defines the constant `$debug` as true when debugging is on. You can conditionalize your code also:
if ($debug) {
  <code that will happen only if debugging is on>
}
The compiler will optimize away the `if` and either insert the code or not, depending on the state of debugging. I guess you could call this a bug. There is not a real good reason for the debug attribute to be so magical. It just evolved that way. See also: http://weblog.openlaszlo.org/archives/2005/11/ conditional-compilation/ There is a bug open on this, http://jira.openlaszlo.org/jira/ browse/LPP-987, currently unassigned.
On 2007-05-08, at 11:58 EDT, Jean-Baptiste BRIAUD wrote:
Hi the list,

I try to get the value of canvas.debug either by getAttribute or direct access it does not work. It is always undefined wherever I try that in handler for oninit, onconstruct (never called) or in the <script> tag.

Debug.write("canvas.debug = " + canvas.getAttribute("debug"));
or
Debug.write("canvas.debug = " + canvas.debug);

Did I forgot something ?

Thanks,
JBB.


Reply via email to