Re: fmdoc - JavaDoc-like comments for FreeMarker

Denis <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
> Hi Denis,
>
> I suppose you talking about the second parameter's default being the
> value of the first one?

Yes, but not for the reason you state.

According to Jonathan
"Just offhand, I wouldn't encourage anybody to do something like that.
It surprised me that it worked at all, actually. I would have to look
at the implementation. It seems to me that the default parameters
should be evaluated in the scope of the enclosing namespace and thus,
what Ioannis was doing should fail."

I went and checked you code, and sure enough you have:

<#macro label for field=for errorClass="error" code="" attributes...>

Try renaming field to for, for to field...
It may even be VM dependent unless Sun standardized string hashes for  
some reason.

-- Denis.

> By unreliable you mean that this will lead to
> unexpected results when there is a variable called "bar" in the same
> (or global) namespace? If this is the case, is there a more reliable
> way to do it?
>
> Thanks for pointing this out,
> -Felix
>
>
> On May 16, 2008, at 3:33 , Denis wrote:
>
>> Hi Felix
>>
>> Does your library rely on the undocumented, unreliable
>>
>> <#macro foo bar baz=bar>
>> ?
>>
>> -- Denis. 
>>
>

-------------------------------------------------------------------------
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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.