View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006221 | JEDI VCL | 00 JVCL Components | public | 2013-10-24 11:40 | 2014-12-04 16:30 |
Reporter | Stregor | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | suspended | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | ||||
Summary | 0006221: JvAppStorage always store Variants as String | ||||
Description | I want store TcxSpinEdit.Value. Value is stored properly, but when restored, TcxSpinEdit.Value setter is called. Then, setter ignore my stored value, because accept only numeric values. procedure TJvCustomAppStorage.ReadProperty ALWAYS read variants as strings. Problem can be resolved simply : we can check previous type of property, read new value to temp variant variable and convert that temp variable to necessary type. Solution: procedure TJvCustomAppStorage.ReadProperty 1. add two variables: TmpVariantValue: Variant; VT: TVarType; 2. change case tkVariant - code before: tkVariant: SetVariantProp(PersObj, PropName, ReadString(Path, VarToStr(GetVariantProp(PersObj, PropName)))); code after: tkVariant: begin TmpVariantValue := GetPropValue(PersObj, Propname); VT := VarType(TmpVariantValue); TmpVariantValue := ReadString(Path, VarToStr(GetVariantProp(PersObj, PropName))); TmpVariantValue := VarAsType(TmpVariantValue, vt); SetVariantProp(PersObj, PropName, TmpVariantValue); end; TmpVariantValue := VarAsType(TmpVariantValue, vt); SetVariantProp(PersObj, PropName, TmpVariantValue); end; | ||||
Tags | No tags attached. | ||||
|
Sorry, code after will be: tkVariant: begin TmpVariantValue := GetPropValue(PersObj, Propname); VT := VarType(TmpVariantValue); TmpVariantValue := ReadString(Path, VarToStr(GetVariantProp(PersObj, PropName))); TmpVariantValue := VarAsType(TmpVariantValue, vt); SetVariantProp(PersObj, PropName, TmpVariantValue); end; |
|
Please try with the latest JVCL version in GIT (or daily zip) and then send us a zipped file containing the sources of an application showing the issue. |
|
No news, suspending the issue |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-10-24 11:40 | Stregor | New Issue | |
2013-10-24 11:44 | Stregor | Note Added: 0020687 | |
2013-12-13 11:09 | obones | Note Added: 0020747 | |
2013-12-13 11:09 | obones | Status | new => feedback |
2014-12-04 16:30 | obones | Note Added: 0021110 | |
2014-12-04 16:30 | obones | Status | feedback => resolved |
2014-12-04 16:30 | obones | Resolution | open => suspended |
2014-12-04 16:30 | obones | Assigned To | => obones |