[stringtemplate-interest] <attribute.property> didn't look for a property in C# StringTemplate RE: (no subject)
Sam Harwell
sharwell at pixelminegames.com
Thu Nov 25 12:24:17 PST 2010
Which StringTemplate assembly are you using? I know the one I wrote checks
properties because the C# port of the ANTLR Tool relies on it heavily for
compiling grammars.
Sam
From: stringtemplate-interest-bounces at antlr.org
[mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of Jon Nilsson
Sent: Thursday, November 25, 2010 12:49 AM
To: Ter Parr
Cc: stringtemplate-interest at antlr.org
Subject: [stringtemplate-interest] <attribute.property> didn't look for a
property in C# StringTemplate RE: (no subject)
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/b2232977/attachment.html
More information about the stringtemplate-interest
mailing list