Bug 610 - Migrating to mixed-case properties in HopObject
: Migrating to mixed-case properties in HopObject
Status: RESOLVED FIXED
: Helma
HopObject Functionality
: CVS trunk
: All All
: P1 normal
: 1.7.0
Assigned To:
:
:
:
  Show dependency treegraph
 
Reported: 2008-03-25 13:45 by
Modified: 2008-10-20 14:55 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-03-25 13:45:05
Is there any plan to get rid of the lower-case property names in a HopObject?

I know it's not a general issue because all properties are generally
accessible:

var h = new HopObject;
h.FOO = "bar";
res.debug(h.FOO === h.foo); // true

However, when looping over a HopObject one gets only the lowercase property
names:

var o = new Bar; // assumed there's a mapping for FOO in Bar.properties
for (var i in o) {
   o[i] = h[i]; // o.FOO will *never* be set, onl o.foo which is unmapped
}

This leads to unwanted results e.g. when using output via Xml.write/read for
exporting and importing data between two applications.

What about an application-wide switch for enabling/disabling mixed-case
property names in HopObjects?
------- Comment #1 From 2008-09-01 09:43:45 -------
Adding this bug to version 1.6.3 with only a flicker of hope ;)
------- Comment #2 From 2008-09-01 09:50:31 -------
Oops! Switched the version instead of the target milestone... correcting.
------- Comment #3 From 2008-10-17 16:36:06 -------
Just committed to svn: HopObject properties are now case sensitive.
------- Comment #4 From 2008-10-20 14:55:20 -------
This might break existing apps and data, retargeting to 1.7.0