View Issue Details

IDProjectCategoryView StatusLast Update
0004293JEDI VCL00 JVCL Componentspublic2007-12-16 12:53
ReporterbheAssigned ToAHUser 
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.34 
Summary0004293: Docklayout restoration for storage for not existign forms
DescriptionWhen recreating a stored docking layout in TJvDockInfoTree.CreateZoneAndAddInfoFromAppStorage
the list of forms is retrieved from the storage info.

If a form has been removed from the application (or is not created yet)
the list can contain invalid form names.
This leads to incomplete restored layouts or even error - depending on the layout structure.

The solution idea is to identify user forms by the TJvDockFormStyle attribute in appstorage. Please see my attached fix.
Additional Information
procedure TJvDockInfoTree.CreateZoneAndAddInfoFromAppStorage;
...
begin
  FormList := TStringList.Create;
  ...
      if FAppStorage.ValueStored('FormNames') then
      begin
        S := FAppStorage.ReadString('FormNames');
        ...
        CP := PChar(S);
        CP1 := StrPos(CP, ';');
        while CP1 <> nil do
        begin
          CP1^ := #0;
          // <(bhe)>: Aim is to avoid restoration of not (yet) existing
          // "user forms" -> DockFormStyle == dsNormal
          if TJvDockFormStyle(FAppStorage.ReadInteger(FAppStorage.ConcatPaths(
            [string(CP), 'DockFormStyle']))) = dsNormal then
          begin
            // Only add to restore list if form exists
            for I := 0 to Screen.FormCount - 1 do
            begin
              if Screen.Forms[I].Name = string(CP) then
              begin
                FormList.Add(string(CP));
                Break;
              end;
            end;
          end else
          // </(bhe)>
            FormList.Add(string(CP));
          CP := CP1 + 1;
          CP1 := StrPos(CP, ';');
        end;
        ...
end;
TagsNo tags attached.

Activities

2007-11-14 03:40

 

JvDockInfo.zip (8,708 bytes)

AHUser

2007-12-16 12:53

developer   ~0014065

Fixed in SVN.

Issue History

Date Modified Username Field Change
2007-11-14 03:40 bhe New Issue
2007-11-14 03:40 bhe File Added: JvDockInfo.zip
2007-12-16 12:53 AHUser Status new => resolved
2007-12-16 12:53 AHUser Fixed in Version => Daily / SVN
2007-12-16 12:53 AHUser Resolution open => fixed
2007-12-16 12:53 AHUser Assigned To => AHUser
2007-12-16 12:53 AHUser Note Added: 0014065