From: Eric R. <eb...@tc...> - 2004-04-04 21:30:52
|
On Apr 3, 2004, at 7:06 PM, Endre St=F8lsvik wrote: > | The Macro interface is pretty simple: write() sends its output to a > | FastWriter, and evaluate() returns to a String. > > Once more: WHEN ARE THEY INVOKED??? Think of it like this: .evaluate() returns the Object, whose toString=20= value is written to the output stream by .write(). If your goal is to write the output of a template, just call=20 Template.write(). If your goal is to modify the Context, call=20 Template.evaluate(). Directives like #set, which don't .write() anything, do their=20 Context-changing work in .evaluate(). Clear as mud? eric= |