Will Glass-Husain wrote:

Hi,

That's an interesting idea. I think it's important that Velocity remain a templating language, not a programming language. But that idea keeps that approach, just adds additional error-checking for the method calls.

You could implement this with a combination of a custom directive and a custom Introspector. If you're adventurous, I suggest you try playing with these, then submit a patch. If it's helpful, you might look at the slides from my talk "Hacking Velocity" at
http://www.jlamp.com/apachecon


WILL


I've been looking at the velocity developer docs and API. I agree, that a custom directive would be needed to store the variable restriction data. But I don't see how a custom introspector would help me with the checks. Assignments are performed by the #set and #foreach directives and I found no way to alter their behaviour and add additional checks (ie. other than modifying velocity source). I also looked at the event handlers, but there's only one for assignments with null values.

Edmund

--
liland open IT solutions GmbH

email: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to