Re: Parameters defaulting to another [Was: Re: fmdoc - JavaDoc-like comments for FreeMarker]
Attila Szegedi <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
On 2008.05.17., at 1:14, Felix Gnass wrote: > I see. I assumed that parameter defaults would be evaluated in the > order of declaration, as this (coincidently) matched my observations. > So for now the only sane workaround I can think of would be: > > <#macro foo bar baz=""> > <#if !baz?has_content> > <#local baz = bar /> > </#if> > ... > </#macro> > > > Is there any chance that we'll see support for that feature in a > future release? I think it would be a valuable addition to the > FreeMarker language. Yep, I plan to add it. See this thread: <http://www.nabble.com/weird-macro-params-issue-td17015977.html> Attila. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/