View Issue Details

IDProjectCategoryView StatusLast Update
0002672JEDI VCL00 JVCL Componentspublic2005-02-24 07:16
ReporterplamendpAssigned Tojfudickar 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version3.00 
Summary0002672: JvAppIniFileStorage WriteXXXXX() writes only the last
DescriptionThis code (simple application with one main form and button with
OnClick=JvHTButton1Click) writes to ini file ONLY the LAST item ('test4')

TForm1.JvHTButton1Click(Sender: TObject);
begin
  JvAppIniFileStorage1.DefaultSection := 'TEST';
  JvAppIniFileStorage1.WriteInteger('test1',10);
  JvAppIniFileStorage1.WriteInteger('test2',20);
  JvAppIniFileStorage1.WriteInteger('test3',30);
  JvAppIniFileStorage1.WriteInteger('test4',40);
  JvAppIniFileStorage1.Flush;
end;

JvAppIniFileStorage1 Properties:
AutoFlush=false
AutoReload=false
ReadOnly=false


Additional Information
Some info for you, devs:

Changing AutoFlush to TRUE make things working (?!)

Digging in the source I found that there is a

1. Call to TJvCustomAppStorage.ReloadIfNeeded in TJvCustomAppIniStorage.WriteValue()

=>>> 2. subsequent call to TJvCustomAppMemoryFileStorage.ReloadNeeded
wich checks the property FFileLoaded (and AutoReload).

3. FFileLoaded is set to true only in TJvCustomAppMemoryFileStorage.Reload wich is never called (in this example).

4. THUS: after every WriteXXXX() the file is reloaded (with empty sections, if new file, or old key values, if old), hence only the last WriteXXXX() becomes a REAL/VALID writing. (old key values not changed /reloaded again and again/ or ONLY ONE value added /keys previously written erased because of the reloading an empty section/).



hope this make sence
TagsNo tags attached.

Relationships

duplicate of 0002671 resolvedjfudickar JvAppIniFileStorage WriteXXXXX() writes only the last 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2005-02-21 06:43 plamendp New Issue
2005-02-21 23:54 jfudickar Relationship added duplicate of 0002671
2005-02-24 07:16 jfudickar Duplicate ID 0 => 2671
2005-02-24 07:16 jfudickar Status new => resolved
2005-02-24 07:16 jfudickar Resolution open => fixed
2005-02-24 07:16 jfudickar Assigned To => jfudickar