[Laszlo-dev] Calling the dependencies generator

P T Withington ptw at openlaszlo.org
Wed Mar 26 18:35:40 PDT 2008


I did something like that in NodeModel, I just cache an instance of  
the compiler.

On 2008-03-26, at 21:09 EDT, Donald Anderson wrote:
>
> On Mar 24, 2008, at 12:32 PM, P T Withington wrote:
>
>> On 2008-02-27, at 17:15 EST, Donald Anderson wrote:
>>> This snippet added to NodeModel.java during testing (but not part  
>>> of this change)
>>> shows how the new dependency function can be called:
>>>
>>>   if (when.equals(WHEN_ALWAYS)) {
>>>       System.out.println("CONSTRAINT: src = " +  
>>> canonicalValue.toString());
>>>       String dep = (new  
>>> org 
>>> .openlaszlo 
>>> .sc 
>>> .Compiler()).dependenciesForExpression(canonicalValue.toString());
>>>       System.out.println("CONSTRAINT: dep = " + dep);
>>>   }
>>
>> It seems like a bad idea to have to cons up a new sc.Compiler every  
>> time I want to analyze dependencies.  Is there a compiler laying  
>> around that I can just use?
>
>
> We don't have one, but either NodeModel or Compiler could keep one,
> i.e. Compiler.defaultInstance().  Should I provide that, and fix the  
> caller?
> - Don
>
> --
>
> Don Anderson
> Java/C/C++, Berkeley DB, systems consultant
>
> voice: 617-547-7881
> email: dda at ddanderson.com
> www: http://www.ddanderson.com
>
>
>
>



More information about the Laszlo-dev mailing list