|
[jira] Created: (BOO-482) Convert uppercased fields to properties: msg#00042lang.boo.devel
Convert uppercased fields to properties --------------------------------------- Key: BOO-482 URL: http://jira.codehaus.org/browse/BOO-482 Project: Boo Type: Wish Components: Compiler Versions: 0.6 Reporter: Doug Holton Priority: Minor Attachments: autoproperty.patch Just posting this here in case anyone finds it useful. This is a compiler step that creates a property wrapper for any upper-cased field, without the need for the [Property] attribute. The field name is changed to add an underscore and lower-case the first letter. Fields that are private or final are not wrapped with a property. example: import System.Xml.Serialization from System.Xml class C: [XmlElement] Name = "myname" def doit(): print Name c = C() c.doit() print c.Name /////////////////////////// is converted to: import System.Xml.Serialization from System.Xml public class C(System.Object): _name = 'myname' def doit(): print Name [XmlElement] Name: get: return _name set: _name = value c = C() c.doit() print c.Name -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: params Methods, Daniel Grunwald |
|---|---|
| Next by Date: | Printing comments with BooPrinterVisitor, Daniel Grunwald |
| Previous by Thread: | [jira] Created: (BOO-481) errors with attributes in C# to boo converter, Doug Holton (JIRA) |
| Next by Thread: | [jira] Updated: (BOO-482) Convert uppercased fields to properties, Doug Holton (JIRA) |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |