View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update | 
|---|---|---|---|---|---|
| 0005860 | JEDI VCL | 00 JVCL Components | public | 2012-04-19 16:30 | 2012-09-10 14:15 | 
| Reporter | RHoek | Assigned To | obones | ||
| Priority | normal | Severity | feature | Reproducibility | always | 
| Status | resolved | Resolution | fixed | ||
| Product Version | Daily / GIT | ||||
| Target Version | Fixed in Version | 3.46 | |||
| Summary | 0005860: When using JvInspector with Variant properties the TJvInspector VariantItem does not return 'empty' variant | ||||
| Description | When using variants, the JvInspector uses the TJvInspectorVariantItem class to edit the variant data. First: When typing an empty string (''), the empty string value is set in the variant. I think is should be better for the control to set the value to 'Unassigned'. Second: When returning the variant value as a string, it's better to use the 'VarAsString' routine, instead of just assigning the variant tot the string. | ||||
| Additional Information | ORIGINAL CODE: { TJvInspectorVariantItem } function TJvInspectorVariantItem.GetDisplayValue: string; begin Result := Data.AsVariant; end; procedure TJvInspectorVariantItem.SetDisplayValue(const Value: string); begin Data.AsVariant := Value; end; MODIFIED CODE: { TJvInspectorVariantItem } function TJvInspectorVariantItem.GetDisplayValue: string; begin // RH - 2012-04-19: Ensure correct string (Null, Empty) Result := VarToStr(Data.AsVariant); end; procedure TJvInspectorVariantItem.SetDisplayValue(const Value: string); begin // RH - 2012-04-19: When displayvalue is empty string, then set Variant 'empty' if VarToStr(Value) = '' then Data.AsVariant := Unassigned else Data.AsVariant := Value; end; | ||||
| Tags | No tags attached. | ||||
|  | Please provide the zipped sources of a sample application showing this. | 
| 
 2012-06-13 12:30 
 | JVCL BUG - Variant property TJvInspector (empty string).zip (151,372 bytes) | 
|  | I've uploaded the demo. Please note: you need the modification of tracker isssue (5857) - which are included in the project - to make the variant property editing work at all. | 
|  | Thanks, this is now in SVN | 
| Date Modified | Username | Field | Change | 
|---|---|---|---|
| 2012-04-19 16:30 | RHoek | New Issue | |
| 2012-06-11 17:28 | obones | Note Added: 0019853 | |
| 2012-06-11 17:28 | obones | Status | new => feedback | 
| 2012-06-13 12:30 | RHoek | File Added: JVCL BUG - Variant property TJvInspector (empty string).zip | |
| 2012-06-13 12:31 | RHoek | Note Added: 0019945 | |
| 2012-06-13 13:40 | obones | Status | feedback => acknowledged | 
| 2012-06-13 14:19 | obones | Note Added: 0019952 | |
| 2012-06-13 14:19 | obones | Status | acknowledged => resolved | 
| 2012-06-13 14:19 | obones | Fixed in Version | => Daily / SVN | 
| 2012-06-13 14:19 | obones | Resolution | open => fixed | 
| 2012-06-13 14:19 | obones | Assigned To | => obones | 
| 2012-09-10 14:15 | obones | Fixed in Version | Daily / SVN => 3.46 | 
