[stringtemplate-interest] <attribute.property> didn't look for a property in C# StringTemplate RE: (no subject)

Jon Nilsson jonhansnilsson at hotmail.com
Wed Nov 24 22:48:41 PST 2010


Thank you, Ter, for suggestion:  time for a formal object def in the model. 
It worked great except:

<attribute.property> did *NOT* look for property of attribute as a property (C#) unlike what the cheat sheet said.
It did worked with getProperty() and a raw field.

Here is what the cheat sheet says: (http://www.antlr.org/wiki/display/ST/StringTemplate+cheat+sheet)

<attribute.property> 
 Looks for property of attribute as a property (C#), then accessor methods like getProperty() or isProperty(). If that fails, StringTemplate looks for a raw field of the attribute called property. Evaluates to the empty string if no such property is found. 


Subject: Re: [stringtemplate-interest] (no subject)
From: parrt at cs.usfca.edu
Date: Sun, 21 Nov 2010 08:37:21 -0800
CC: stringtemplate-interest at antlr.org
To: jonhansnilsson at hotmail.com



Hi Jon, probably time for a formal object def in the model.Ter
On Nov 20, 2010, at 10:08 PM, Jon Nilsson wrote:It looks like setAttribute() can handle only up to 5 arguments in StringTemplate C# 3.2.
It is causing a problem when I need to do the following:	rect.SetAttribute("rectangle.{arrayname, index, x, y, width, height}", "MyArray", 0, 100, 100, 32, 34);
What do you recommend?
According the the documentation: 	"The various overloads of the setAttribute() method can handle from 1 to 5 arguments. 	The C# version uses variable-length argument list (using params keyword)." 	http://www.stringtemplate.org/wiki/display/ST/Expressions

_______________________________________________
stringtemplate-interest mailing list
stringtemplate-interest at antlr.org
http://www.antlr.org/mailman/listinfo/stringtemplate-interest

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20101125/a501fba5/attachment.html 


More information about the stringtemplate-interest mailing list