[Laszlo-dev] Declaring static class variables in LZX
Max Carlson
max at openlaszlo.org
Mon Jan 19 19:00:28 PST 2009
Is there a way to declare a static variable for a class in LZX? Right
now we're doing this after the class declaration:
<script><![CDATA[
// Initialize the shared class variables in lz.mediadevice class
/* Shared flag defined in mediadevice.prototype that
tracks whether the user has allowed device access.
True after user has accepted security dialog,
false if the user denies access with security dialog.
Note: allowed is not defined in objects, but in the
prototype.
Initialized in the script at the end of the file.
@keywords readonly */
lz.mediadevice.allowed = false;
]]>
</script>
If we were writing the class in script, we'd be able to do this:
static var allowed = false
--
Regards,
Max Carlson
OpenLaszlo.org
More information about the Laszlo-dev
mailing list