View Issue Details

IDProjectCategoryView StatusLast Update
0002671JEDI VCL00 JVCL Componentspublic2005-02-24 07:16
ReporterplamendpAssigned Tojfudickar 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version3.00 
Summary0002671: 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

has duplicate 0002672 resolvedjfudickar JvAppIniFileStorage WriteXXXXX() writes only the last 

Activities

jfudickar

2005-02-23 15:17

developer   ~0006554

Fixed in CVS, please Test it.

plamendp

2005-02-24 05:53

reporter   ~0006558

TEST succeeded.
Works fine.

Issue History

Date Modified Username Field Change
2005-02-21 06:43 plamendp New Issue
2005-02-21 23:54 jfudickar Status new => assigned
2005-02-21 23:54 jfudickar Assigned To => jfudickar
2005-02-21 23:54 jfudickar Relationship added has duplicate 0002672
2005-02-23 15:17 jfudickar Note Added: 0006554
2005-02-23 15:19 jfudickar Status assigned => feedback
2005-02-24 05:53 plamendp Note Added: 0006558
2005-02-24 07:16 jfudickar Status feedback => resolved
2005-02-24 07:16 jfudickar Resolution open => fixed