Good call - it wasn't the capitalization... that was a typo on my part as I snipped my code for mailing list consumption.
I think the problem is actually the argument type. Quantity is actually an Integer, so I'm calling for (Integer, int), but the method is written as (String, int). Thanks for the help. Is there are reason that Velocity dies so silently, without even a log message when it can't evaluate an expression? -Rob -----Original Message----- From: Nathan Bubna [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 11:17 AM To: Velocity Users List Subject: Re: Macro not evaluating Rob Kischuk said: ... > public String leftPad(String string, int width) { --------------------^----------------------- note the capitalization ... > And have defined macros in my template: ... > #macro(leftpad $message) > ${formatter.leftpad($message, 8)} -------------------^----------------- > #end note the capitalization. ... > Strangely, the #currency macro fully executes, but the #leftpad macro leaves > $formatter.leftpad($orderLine.quantity, 8) after the template has been > processed. Is there something I'm doing wrong here? it looks mismatched capitalization. if not (and that typo is only in this email), then you might double check that $orderLine.quantity is actually returning a string. > And is there a different way I should be doing this? apart from the capitalization typo, it looks like a good pattern. Nathan Bubna [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
