#364 closed defect (fixed)
MgDataPropertyDefinition::Length ,GetLength() and SetLength() can be assigned to with a negative value;
Reported by: | jessicacao | Owned by: | Tom Fukushima |
---|---|---|---|
Priority: | medium | Milestone: | 2.0 |
Component: | General | Version: | |
Severity: | major | Keywords: | MgDataPropertyDefinition::SetLength |
Cc: | Trevor Wekel | External ID: | 985014, 1044251 |
Description
MgDataPropertyDefinition::Length ,GetLength() and SetLength() can be assigned to with a negative value;
- Construct an instance of MgDataPropertyDefinition using the following code
MgDataPropertyDefinition dataPropDefinition = new MgDataPropertyDefinition("dataPropDefinition");
- Assigned a negative value to Length and use method GetLength to return the value
dataPropDefinition.Length = -10; Assert.AreEqual(-10, dataPropDefinition.GetLength());
- Use the method SetLength to set a negative value, and use Length to return the value
dataPropDefinition.SetLength(-23);
Assert.AreEqual(-23, dataPropDefinition.Length);
Sample code:
MgDataPropertyDefinition dataPropDefinition = new MgDataPropertyDefinition("dataPropDefinition");
dataPropDefinition.Length = -10;
Assert.AreEqual(-10, dataPropDefinition.Length);
dataPropDefinition.SetLength(-23);
Assert.AreEqual(-23 dataPropDefinition.Length);
Change History (3)
comment:1 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 17 years ago
External ID: | 985014 → 985014, 1044251 |
---|
Scale property can have negative values. When scale is negative, it means that the values must be mulitples of 10-(scale), i.e. when scale = -2, values must be multiples of 100. Refer to FDO external id 1038260.01.
Patch submitted by Jessica Cao
http://trac.osgeo.org/mapguide/changeset/2698