Little bug maybe?

0 views
Skip to first unread message

Marcos Vinícius

unread,
Nov 25, 2009, 12:30:09 PM11/25/09
to CslaGenerator
Hello all,

There's this extremely minor letter-casing bug I noticed:

1) I have set some of my "ToString Property" properties in CSLAGen to
a column of mine which is called nome
2) When code is generated, the ToString() method override is generated
as follows (notice the lower-case property "nome"):

/// <summary>
/// Returns a string that represents a current <see cref="Cidade" />
/// </summary>
public override String ToString()
{
// Return the Primary Key As a String
return nome.ToString(); // <<<<<< lower-case here
}

3) But, on the other hand, the property name ("Nome") for the class
was generated with an uppercase letter, like this:

public String Nome
{
get
{
CanReadProperty("Nome", true);
return m_nome;
}
set
{
CanWriteProperty("Nome", true);
if (m_nome != value)
{
m_nome = value;
PropertyHasChanged("Nome");
}
}
}

So I have to go about all my EditableRoot objects changing the letter
casing, which is fine, but this could be easily corrected I guess.

Cheers,

Andrés Villanueva

unread,
Nov 25, 2009, 1:44:31 PM11/25/09
to cslage...@googlegroups.com
Yes, seems like a bug.
If you want to solve it right away you can edit ObjectOverrides.inc (inside Templates\CSLA20\CSharp)
and change:
<%=prop.Name %>
for:
<%=FormatPascal(prop.Name)%>

Thanks for the hint!

2009/11/25 Marcos Vinícius <marcos...@gmail.com>



--
Andrés
Reply all
Reply to author
Forward
0 new messages