View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003651 | JEDI VCL | 00 JVCL Components | public | 2006-04-20 06:40 | 2006-07-29 07:41 |
Reporter | Salvatore Besso | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | not fixable | ||
Product Version | 3.10 | ||||
Target Version | Fixed in Version | ||||
Summary | 0003651: TJvFormStorage's StoredValues.Type arbitrarily changed | ||||
Description | TJvFormStorage's StoredValues.Type is arbitrarily changed from String to OleStr if Value is emptied. This is a wrong behaviour, since a String type is always a String type, even if empty :-) so the Type property must remain as designed, even if Value is emptied. See attached test case (very simple) and follow the instructions in the label. | ||||
Additional Information | There is not any active code in the test case because it is not needed and you even don't need to run it. | ||||
Tags | No tags attached. | ||||
2006-04-20 06:40
|
Testcase.zip (2,000 bytes) |
|
I don't think we can easily do anything about that as the "type" is chosen by Delphi when reading the Variant. Any guesses as to how to improve this while keeping backward compatibility ? |
|
hello Olivier, > the "type" is chosen by Delphi one moment: You "the programmer" choose the type when you set it in the object inspector, isn't it? Or better, I suppose that there is a sort of automated mechanism that chooses the type if you simply set the value, based on it. But thereafter you can change the type manually. For example the component is initially unassigned and then I set its type as string, leaving the value empty. When I reopen the project I find the type changed to Olestr. Then I set its value to a dot "." and its type back to a string. Next time I reopen the project the type is still a string. Then, if it is Delphi to set the type, why it is not Olestr again in this case? Maybe Delphi consider any variant value a string and an empty variant an Olestr? Anyway I have temporarily set the value of strings to a dot "." as a workaround so the type stays as I set it (string) but I suppose that it could stay as is even if I clear the value. If this is not possible without breaking backward compatibility, I will keep the dot workaround. After all the value set in the object inspector is used only as a default value if the component is unable to read it back from the storage, isn't it? |
|
The Type value you see in the inspector is show by Delphi for a Variant type. We have no direct control over it that I know of. Hence the "not fixable" nature of this issue. |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-04-20 06:40 | Salvatore Besso | New Issue | |
2006-04-20 06:40 | Salvatore Besso | File Added: Testcase.zip | |
2006-06-09 01:54 | obones | Note Added: 0009509 | |
2006-06-09 01:54 | obones | Status | new => feedback |
2006-06-09 03:19 | Salvatore Besso | Note Added: 0009526 | |
2006-07-29 07:40 | obones | Status | feedback => resolved |
2006-07-29 07:40 | obones | Resolution | open => not fixable |
2006-07-29 07:40 | obones | Assigned To | => obones |
2006-07-29 07:40 | obones | Note Added: 0009904 |