From: Keats K. <ke...@xa...> - 2005-03-30 23:38:10
|
Hey Mike, Yes I'm back from SD West. No, I wasn't promoting WebMacro. (I did get to hang out with Brian for a bit though.) I'm working on the #eval stuff, but I'm having a little trouble getting my dev environment set up again. (It has been a while.) I hope to get it finished by next week. btw, Looking at the code, it appears that the "inline" functionality is the default if you don't specify a "using" clause. I think this is the way it should work. Also, I'm toying with the idea of making it two different directives, #eval and #seval, one for Macro objects (e.g. Templets) and the other for String templates. This might make things a bit more straightforward. Any thoughts? I think I like most of the ideas you are suggesting. (Some of them look familiar.) I'll try to digest them a bit over the weekend. I'm not sure about the #while directive, but we can always include it as an option. (I've actually been thinking about a #case/#when directive.) [btw, For some reason your post only came through in the digest -- maybe because of the attachments?] Keats > > 1. WebMacro 2.0 release? / Items that are modified or added by Mike W / Marcel H (Mike Weerdenburg) > ----- Message from "Mike Weerdenburg" <M.W...@tr...> > on Wed, 30 Mar 2005 16:36:52 +0200 ----- > > [WebMacro-user] WebMacro 2.0 release? / Items that are modified or > added by Mike W / Marcel H > > Hello everybody, > > it would be great to have "soon" a 2.0 release. > > I'd like to see the following items to be included in this new version: > > 1) adjusted DefaultDirective (see attachment). > > Made #default pre wm2 compatible. > #default $myVar to "value" has been deprecated, but NOW it still works! > > 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 > exampl. c:/logs/wmlog -> c:/logs/wm_log_20050105 > > Now it is : > exampl. c:/logs/wm.log -> c:/logs/wm_20050105.log > exampl. c:/logs/wmlog -> c:/logs/wm_log_20050105 > > 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 1000000 loops! Use a limit value < 0 to > create a loop without a limit, this could hang your template! > > > 4) new SilentEvaluationExceptionHandler (see attachment) > > An implementation of EvaluationExceptionHandler which throws some > exception's when it is called. > The error is stored back into the webcontext $WMERROR (as ArrayList) and > could be handled by the templatewriter. > > You can use this in case of a live-situation to mail the error or show the > error in a fashioned way. > > Example: > #if ( $Variable.isDefined("WMERROR") ) > { > <B>Error(s):</B><BR> > #foreach $item in $WMERROR > { > $item<BR> > } > } > > * This one looks like the 'DebugEvaluationExceptionHandler' but doesn't > throw all the Exeptions. > > > 5) adjusted EvalDirective (no attachment, sorry I have no clue how to adjust > this) > > #eval <Macro or String> [using { ... }] > > To 'parse' a Macro or String value... > > Keats? Already back from Calif? To do some SD for the WM community? ;-) > > > Please add this modifications / add-ons to WebMacro 2.0 ! > > Greetings > Mike Weerdenburg > > > PS. Maybe we should make a wish list for this 'new' WebMacro 2.0 release? > And set a date! when it should be up and running? |