[Laszlo-dev] where should random top level code be getting put when building the LFC?

Henry Minsky henry.minsky at gmail.com
Tue Jan 8 13:15:51 PST 2008


In the kernel LzIdleKernel file,  there is currently a statement just
sitting at the top level, which is supposed to start
the idle timer:

public class LzIdleKernel {
...
...
}

setInterval( LzIdleKernel.__update, 33 );


The compiler currently just silently ignores this. The compiler does put top
level var definitions into their
own compilation units, but we don't seem to do this for statements or
blocks. Maybe we should? It's not clear
to me what order these code fragments will execute in though. I'm not sure
how much we depend on executing
code inline in the LFC at this point.

In fact I  don't think calling setInterval will even necessarily work if
it's in some file, this call seems to need
to be called after the main application entry class constructor is executed.
So for this case I'll put this call  in as part of the
boilerplate for app startup.  But we need to look for other places in the
LFC that we depend on executing chunks of code,
if there are any.









-- 
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20080108/fcca3f7c/attachment.html


More information about the Laszlo-dev mailing list