Hello TBBETA,

evaluation of %pageNumber and %totalPages macros does not work when
used within an %if macro. More exactly: it seems that within an %if
macro, the %pageNumber and %totalPages macros are always producing
empty text only. The usual %if comparisons work correctly, assuming
this "expansion to empty text".

Steps to reproduce the bug:
  1. Menu "Message", "Print setup", tab "General",
     check "Print page numbers",
     check "Use the specified template"
  2. Try one of the page number templates listed below
  3. Print a one-page and a multiple-page message
  4. The printed pages contain output different from what you would
     expect.
  5. Try the following page number template:
       %pageNumber/%totalPages
     and verify that output is always correct
  6. Try the following page number template:
       %if:"x"=="x":"%date":"%time"
     and verify that output is always correct (current date)

Page number templates that don't work:
 %if:"x"=="x":"%pageNumber":"%totalPages"
 %if:"x"=="y":"%pageNumber":"%totalPages"
 %if:"%totalPages"<="1":"":"%pageNumber/%totalPages"
 %if:"%totalPages"=="1":"":"%pageNumber/%totalPages"
 %if:"%pageNumber">="%totalPages":"last page":"page %pageNumber"
 %if:"%pageNumber"<="1":"first page":"page %pageNumber"
 %if:"%pageNumber"=="1":"first page":"page %pageNumber"

BTW: What I'm trying to achieve is to print page numbers only for
multiple-page messages while suppressing them for one-page messages.
Maybe there is a workaround with regexps but nevertheless I think the
current behaviour is a bug which should be fixed.

Regards
Michael

-- 
The Bat! 1.53d
Windows NT 4.0 Build 1381 Service Pack 6


-- 
_________________________________________________________
Archives   : http://tbbeta.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]
Latest Beta: 1.54 beta/14
Wish List  : http://wish.thebat.dutaint.com

Reply via email to