View Issue Details

IDProjectCategoryView StatusLast Update
0004886JEDI VCL00 JVCL Componentspublic2009-12-04 15:35
ReporterjeronimoAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionunable to reproduce 
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0004886: JvFormPlacement don't save
DescriptionI have JvFormStorage in a frame and it dont save the properties to the controls in this frame
    
I think the problem is in this line

 if FRestored then

In this procedure

procedure TJvFormStorage.SavePlacement
;
if comment this line. This control save this properties
the variable Frestored is false and don't execute the rest of the procedure
thanks
Additional Informationprocedure TJvFormStorage.SavePlacement;
Var
  JvAppStorageHandler: IJvAppStorageHandler;
begin
// if FRestored then
// begin
    inherited SavePlacement;
    if Supports(Owner, IJvAppStorageHandler, JvAppStorageHandler)then
      JvAppStorageHandler.WriteToAppStorage(AppStorage, AppStoragePath);
    SaveProperties;
    StoredValues.SaveValues;
// end;
end;
TagsNo tags attached.

Activities

obones

2009-08-07 16:29

administrator   ~0015965

Well, if FRestored is False, that's because something went wrong. You should find out why it was never set to True to begin with

jeronimo

2009-08-07 16:57

reporter   ~0015966

Frestored is false only when you create the component

It change to true in
TJvFormStorage.RestorePlacement
TJvFormPlacement.RestoreFormPlacement

I think we should change the variable to false when you execute the procedure to save and check for a false for save

procedure TJvFormPlacement.SaveFormPlacement;
begin
  if Assigned(AppStorage) then
  begin
    ResolveAppStoragePath; //need to resolve if not resolved yet (for Frames)

    if Assigned(FBeforeSavePlacement) then
      FBeforeSavePlacement(Self);
    if VersionCheck <> fpvcNocheck then
      WriteInteger(siVersion, FVersion);
    Save;

    FRestored = false; // and this line ********

    SavePlacement;
    if Assigned(FAfterSavePlacement) then
      FAfterSavePlacement(Self);
    FSaved := True;
  end;
end;


And

procedure TJvFormStorage.SavePlacement;
Var
  JvAppStorageHandler: IJvAppStorageHandler;
begin
 if not (FRestored) then *******
 begin
    inherited SavePlacement;
    if Supports(Owner, IJvAppStorageHandler, JvAppStorageHandler)then
      JvAppStorageHandler.WriteToAppStorage(AppStorage, AppStoragePath);
    SaveProperties;
    StoredValues.SaveValues;
 end;
end;

jfudickar

2009-08-08 15:09

developer   ~0015968

I'm using the component for a long time without problems.

Could you create a sample showing the problems?

Kind regards
Jens

obones

2009-09-23 17:09

administrator   ~0016166

jeronimo: Any news? Could you provide that sample application?

obones

2009-12-04 15:35

administrator   ~0016959

No news, we are not able to reproduce

Issue History

Date Modified Username Field Change
2009-08-07 16:06 jeronimo New Issue
2009-08-07 16:29 obones Note Added: 0015965
2009-08-07 16:29 obones Status new => feedback
2009-08-07 16:57 jeronimo Note Added: 0015966
2009-08-08 15:09 jfudickar Note Added: 0015968
2009-09-23 17:09 obones Note Added: 0016166
2009-12-04 15:35 obones Note Added: 0016959
2009-12-04 15:35 obones Status feedback => resolved
2009-12-04 15:35 obones Resolution open => unable to reproduce
2009-12-04 15:35 obones Assigned To => obones