View Issue Details

IDProjectCategoryView StatusLast Update
0003856JEDI VCL00 JVCL Componentspublic2006-08-14 16:35
ReporterKiriakosAssigned Tojfudickar 
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0003856: WideString support in JvAppStorage
DescriptionThis would be quite useful. The following modifications are needed:

1. Add two methods WriteWideString and ReadWideString:

procedure TJvCustomAppStorage.WriteWideString(const Path: string;
  const Value: WideString);
begin
  WriteString(Path, UTF8Encode(Value));
end;

function TJvCustomAppStorage.ReadWideString(const Path: string;
  const Default: WideString): WideString;
begin
  Result :=UTF8Decode(ReadString(Path, UTF8Encode(Default)));
end;

2. Modify the case statement of TJvCustomAppStorage.ReadProperty

  case PropType(PersObj, PropName) of
    tkLString, tkString:
      SetStrProp(PersObj, PropName, ReadString(Path, GetStrProp(PersObj, PropName)));
    tkWString:
      SetWideStrProp(PersObj, PropName, ReadWideString(Path, GetWideStrProp(PersObj, PropName)));


3. Modify the case statement of TJvCustomAppStorage.WriteProperty


  case PropType(PersObj, PropName) of
    tkLString, tkString:
      if StorageOptions.StoreDefaultValues or not IsDefaultPropertyValue(PersObj, P, nil) then
        WriteString(Path, GetStrProp(PersObj, PropName));
    tkWString:
      if StorageOptions.StoreDefaultValues or not IsDefaultPropertyValue(PersObj, P, nil) then
        WriteWideString(Path, GetWideStrProp(PersObj, PropName));

That's it!
TagsNo tags attached.

Activities

jfudickar

2006-08-14 16:35

developer   ~0009974

Commited to svn. Please have a look for it.

Issue History

Date Modified Username Field Change
2006-08-14 02:56 Kiriakos New Issue
2006-08-14 15:38 jfudickar Status new => assigned
2006-08-14 15:38 jfudickar Assigned To => jfudickar
2006-08-14 16:35 jfudickar Status assigned => resolved
2006-08-14 16:35 jfudickar Resolution open => fixed
2006-08-14 16:35 jfudickar Note Added: 0009974