From: Mike W. - de B. <M.W...@tr...> - 2005-10-20 05:27:39
|
Hello Keats, Here are the 'specs' again, along with the source code... I don't know how to write Ant test code or something, but I have tested the code a lot in production environment... --- 1) adjusted DefaultDirective (see attachment). Made #default pre wm2 compatible. #default $myVar to "value" has been deprecated, but NOW it still works! Verry usefull for migration to WM 2 It generates a warning if LogLevel.directive: NOTICE This is a neat trick to log all the occurences and replace them! Log-example: ../my.wmt:34.2 uses #default $border to "default", please use: #default $border = "default" 2) adjusted LogFile (see attachment) ChangeLog: 14-01-2005 (Mike Weerdenburg) LogFilePerDay It was : exampl. c:/logs/wm.log -> c:/logs/wm.log_20050105 Now it is (this is more logical): exampl. c:/logs/wm.log -> c:/logs/wm_20050105.log Write a message to the 'old' logfile when switching to a 'new' one. 17-07-2002 (Marcel Huijkman) setting for WebMacro.properties added LogFilePerDay usage: LogFilePerDay=FALSE or TRUE LogFileAutoFlush usage: LogFileAutoFlush=FALSE or TRUE (Notice: Only handy when developing on a Operating system, that buffers file-writing, not recommended for production, since it obviously slows down the machine.) 3) new WhileDirective (see attachment) Just have fun with it... Syntax: #while (condition) [limit (int)] { block } WhileDirective implements a WebMacro directive for an while control structure. If you use it without the limit option than it stops after 1,000,000 loops! Use a limit value < 0 to create a loop without a limit, this could hang your template! --- Greetings, Mike Weerdenburg - de Bruin The Netherlands -----Oorspronkelijk bericht----- Van: web...@li... [mailto:web...@li...] Namens Keats Kirsch Verzonden: dinsdag 18 oktober 2005 23:34 Aan: web...@li... Onderwerp: Re: [WebMacro-user] #setprops directive committed Eric got it right. I didn't want to weigh down the directive with too many features and options. But the include thing is handy and we might consider it for a future enhancement. A cool thing with the #include approach is that you can have nested includes, so maybe a generic template sets some properties and then includes others from a locale subdirectory for example. btw, It looks like I got this code committed just in the nick of time, as my laptop got ripped off last night. :-{ Unfortunately I don't think I have a good backup for some of the other WM stuff I've been playing with. Those of you who sent me code to look at, please send it again. I was close to committing new exception classes, and the improved logging class and DefaultDirective. Also, Marc, if you still have the Taglibs stuff I sent you, I'd appreciate a copy back. Someday I'll learn to keep backups! Keats |