"Diethelm Guallar, Gonzalo" wrote:
>
> I have found two quirks in my migration from WebMacro
> to Velocity.
>
> First, for some reason, using
>
> $link.setAction("myAction").setPage("myPage")
>
> does not work, and Velocity just won't expand any part
> of the string; however, by simply changing the order it
> works:
>
> $link.setPage("myPage").setAction("myAction")
>
> This used to work both ways with WebMacro.
That should be a fixed introspection issue. Let me know if the latest
CVS (or last night's tarball) doesn't work, as it's an area I am
currently working on...
> Second, and this one is harder to explain: I have code
> that looks like this:
>
> #foreach ($a in [1,2,3,4])
> #if ($count($a) > 0)
> <p>Processing area $a.<p>
> $b = $fetch($a)
> ## do something with $b
> #end
> #end
>
> It is the case that if I called $fetch with an argument
> for which $count returns 0, $fetch would return null.
> However, as far as I can see I'm protecting myself from
> ever doing that, since there is an #if surrounding the
> call to $fetch. Well, the fact is, it seems $fetch gets
> called anyway, returning null sometimes, and generating
> error messages on further processing;
As jon said, fix is on the way :)
I have checked this
> because every call to $fetch prints something on the log
> file. And even weirder, the paragraph "Processing area $a"
> is ONLY printed when the #if is true!!! In other words,
> the paragraph seems to respect the flow of control, but
> the call to $fetch is done ALWAYS. This is REALLY not
> expected behavior...
Nor intended :)
geir
--
Geir Magnusson Jr. [EMAIL PROTECTED]
Dakota tribal wisdom: "when you discover you are riding a dead horse,
the best strategy is to dismount."
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]