From: Keats <ke...@ea...> - 2003-07-24 16:06:53
|
> > #newobject $x > > #set $x.SomeProp = [ 1, 2, 3, 4, 5, 6 ] > > > > I'm pretty sure Brian has made the parser smart enough to do all this at > > build time, since there are no runtime dependencies. > > Hmm, really? will #set auto detect that something is in the build context? > If so... wow! > > In which case I'd just need to add "as const" keywords to #newobject and > then people using #newobject don't even need to care if it is a const or > not (i.e. use #set as normal, not #const). > > Surely though, using #set would require WM to detect a non-build time right > hand assignment, which would result in an exception surely? After looking at the code, I see that #set does the actual assignment at runtime. You can't do what you want at build time because a constant has to be a SimpleVariable (i.e., no dots). I'm not sure what it would take to change this. Do you have a compelling need for this? Keats |