[stringtemplate-interest] Current C# Dev Version

Dustin A. Lambert dustin at biztechetc.com
Tue Aug 4 04:19:13 PDT 2009


Greetings,

I've been testing the latest C# beta and discovered a problem...

If I set a template parameter to an object of System.DateTime like so:
var master = Global.Templates.GetInstanceOf("master");
master.SetAttribute("Today", System.DateTime.Now);

And then in the template do something like this:
<p>&copy; 2008- $Today.Year$ . All rights reserved.</p>

$Today.Year$ comes out as a weird number... i.e. "© 2008- 10540 "

I checked for custom renderers and did not find any..
?master.GetAttributeRenderer(typeof(DateTime))
null

?master.GetAttributeRenderer(typeof(int))
null

Any suggestions?

Thanks!

Dustin Lambert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20090804/aa41a31c/attachment.html 


More information about the stringtemplate-interest mailing list