Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004293 [JEDI VCL] 00 JVCL Components tweak always 2007-11-14 03:40 2007-12-16 12:53
Reporter bhe View Status public  
Assigned To AHUser
Priority normal Resolution fixed Platform
Status resolved   OS
Projection none   OS Version
ETA none Fixed in Version 3.34 Product Version Daily / GIT
  Target Version Product Build
Summary 0004293: Docklayout restoration for storage for not existign forms
Description When 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.
Steps To Reproduce
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;
Tags No tags attached.
Attached Files zip file icon JvDockInfo.zip [^] (8,708 bytes) 2007-11-14 03:40

- Relationships

-  Notes
(0014065)
AHUser (developer)
2007-12-16 12:53

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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker