I think we probably need to have a list of forms to execute at
startup, like the lispm had... And you push things onto this list in
various files and the list gets run as the last thing when loading the
LFC.
Then you could stick stuff like this right in the class def, instead
of putting it at top level.
On 2008-01-08, at 16:15 EST, Henry Minsky wrote:
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
[EMAIL PROTECTED]