WebMacro 2.0 release? / Items that are modified or added by Mike W / Marcel H
"Mike Weerdenburg" <[email protected]>
| Newsgroups | gmane.comp.java.webmacro.user |
|---|---|
| Message-ID | <200503301636435.SM01364@schuurpcxp> |
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?
DefaultDirective.java
(application/octet-stream, 4.7 KB) - not displayed
WhileDirective.java
(application/octet-stream, 4.6 KB) - not displayed
LogFile.java
(application/octet-stream, 6.2 KB) - not displayed
SilentEvaluationExceptionHandler.java
(application/octet-stream, 5.8 KB) - not displayed