[Spark View Engine] #41: GlobalMembersVisitor - Visit(GlobalVariableChunk chunk)

1 view
Skip to first unread message

Spark View Engine

unread,
Aug 24, 2008, 11:42:08 AM8/24/08
to spar...@googlegroups.com
#41: GlobalMembersVisitor - Visit(GlobalVariableChunk chunk)
-------------------------------+--------------------------------------------
Reporter: sharpoverride | Owner:
Type: defect | Status: new
Priority: trivial | Component: Spark Core
Keywords: global const types |
-------------------------------+--------------------------------------------
By default this generates
[type] _[var_name] = [value_given]
public [type] [var_name] {{ get{ return _[var_name] ;} set { _[var_name] =
value; }}

So when we write something like :
<global type="const int" extraPadding="0" />
the generated code throws a compile error since constant variables require
a value to be given to them and no property.

This can be regarded as a special case and create a constant field
generator or a simple check for this case could also suffice.

Error was found on Head Revision 90 from trunk

--
Ticket URL: <http://dev.dejardin.org/trac/spark/ticket/41>
Spark View Engine <http://dev.dejardin.org/trac/spark>
Spark View Engine

Spark View Engine

unread,
Aug 24, 2008, 12:31:42 PM8/24/08
to spar...@googlegroups.com
#41: GlobalMembersVisitor - Visit(GlobalVariableChunk chunk)
----------------------------+-----------------------------------------------
Reporter: sharpoverride | Owner: louis.dejardin
Type: defect | Status: assigned
Priority: trivial | Component: Spark Core
Resolution: | Keywords: global const types
----------------------------+-----------------------------------------------
Changes (by louis.dejardin):

* owner: => louis.dejardin
* status: new => assigned

Comment:

Yep - a recent change broke that example. The change from fields to
{get;set;} was made to allow an IoC containers to assign view class
members, like INavRepository.

I agree looking for words const and readonly in the type, and putting out
fields for those cases, would work.

--
Ticket URL: <http://dev.dejardin.org/trac/spark/ticket/41#comment:1>

Spark View Engine

unread,
Aug 24, 2008, 12:55:07 PM8/24/08
to spar...@googlegroups.com
#41: GlobalMembersVisitor - Visit(GlobalVariableChunk chunk)
----------------------------+-----------------------------------------------
Reporter: sharpoverride | Owner: louis.dejardin
Type: defect | Status: closed
Priority: trivial | Component: Spark Core
Resolution: fixed | Keywords: global const types
----------------------------+-----------------------------------------------
Changes (by louis.dejardin):

* status: assigned => closed
* resolution: => fixed

--
Ticket URL: <http://dev.dejardin.org/trac/spark/ticket/41#comment:2>

Mihai

unread,
Aug 24, 2008, 1:47:54 PM8/24/08
to Spark View Engine Dev

The only reason I found it was because you showed me how to test the
view :P
After I get more comfortable with the engine I'll try to help improve
it if that's OK :) .
But I really like the way you've written it thus far and tests are
really paying off :P.
Reply all
Reply to author
Forward
0 new messages