[Laszlo-dev] creating new global vars dynamically, for node id's

P T Withington ptw at openlaszlo.org
Mon Jan 14 04:23:07 PST 2008


Technically, don't we say that 'id' is a tag-only const property?  In  
which case, the tag compiler should be able to emit global `var`  
declarations for any id's that it comes across and the runtime then  
just stores the created node in that var.

We don't allow you to give an id to a class that you `new` dynamically  
at run time.

I think doing it that way is no harder than the alternative:  creating  
an object that acts as a global namespace and wrapping `with  
(lfc::global) ...` around every statement.

On 2008-01-13, at 22:56 EST, Henry Minsky wrote:

> I'm not clear on how LzNode should be trying to set globals for node  
> id's.
>
> When a node is assigned an id, it is supposed to bind that id as a  
> variable
> someplace so that it can be
> referenced from anywhere. I'm not sure how to code this for swf9. Do  
> we have
> a way to add properties to the
> default package at runtime, or should we be putting these someplace  
> else?
>
> -- 
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com



More information about the Laszlo-dev mailing list