View Issue Details

IDProjectCategoryView StatusLast Update
0001902JEDI VCL00 JVCL Componentspublic2004-07-01 14:43
ReporteranonymousAssigned Tojfudickar 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version 
Target VersionFixed in Version 
Summary0001902: TJvFormStroage.ReadString don't work with relative path
DescriptionI use the TJvFormStorage in conjunction with TJvAppSorage and TJvAppRegistryStorage. I have configure them like
this:
 
JvAppRegistryStorage.Root := 'Software\' +Application.Title;
JvAppStorage.SubStorages.Add('User', JvAppRegistryStorage);
JvFormStorage.AppStorage := JvAppStorage;
JvFormStorage.AppStoragePath := '\User\';
 
After that, every component property I link to JvFormStorage is saved under
 
HKEY_CURRENT_USER\Software\MyApplicationName
 
but when I want to read a string-value like this
 
JvFormStorage.ReadString('UserName', 'HZ');
 
I get an invaild path exception because the resulting path for lookup is
 
HKEY_CURRENT_USER\Software\MyApplicationName
 
To read successfully I must code
 
JvFormStorage.ReadString('\User\UserName', 'HZ');

So, JvFormStorage don't work with relative paths.
Additional InformationAll Read and Write methods of TJvFormPlacement should implemented like this:

function TJvFormPlacement.ReadString(const Ident, Default: string): string;
begin
  if Assigned(AppStorage) then
    Result := AppStorage.ReadString(AppStorage.ConcatPaths([AppStoragePath, Ident]), Default)
  else
    Result := Default;
end;
TagsNo tags attached.

Activities

2004-06-29 07:04

 

Unit1.pas (1,021 bytes)

jfudickar

2004-06-30 11:22

developer   ~0004648

Already changed.

The current realisation looks like:
function TJvFormPlacement.ReadString(const Ident: string; const Default: string = '') : string;
begin
  if Assigned(AppStorage) then
    with AppStorage do
      Result := ReadString(ConcatPaths([AppStoragePath, TranslatePropertyName(Self, Ident, True)]), Default)
  else
    Result := Default;
end;

Issue History

Date Modified Username Field Change
2004-06-29 07:04 anonymous New Issue
2004-06-29 07:04 anonymous File Added: Unit1.pas
2004-06-30 11:21 jfudickar Status new => assigned
2004-06-30 11:21 jfudickar Assigned To => jfudickar
2004-06-30 11:22 jfudickar Note Added: 0004648
2004-06-30 11:22 jfudickar Resolution open => fixed
2004-07-01 14:43 jfudickar Status assigned => resolved
2004-07-01 14:43 jfudickar Resolution fixed => no change required
2004-07-01 14:43 jfudickar Status resolved => closed