Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002671 [JEDI VCL] 00 JVCL Components major always 2005-02-21 06:43 2005-02-24 07:16
Reporter plamendp View Status public  
Assigned To jfudickar
Priority normal Resolution fixed  
Status resolved   Product Version
Summary 0002671: JvAppIniFileStorage WriteXXXXX() writes only the last
Description This 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
Tags No tags attached.
Attached Files

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

-  Notes
(0006554)
jfudickar (developer)
2005-02-23 15:17

Fixed in CVS, please Test it.
(0006558)
plamendp (reporter)
2005-02-24 05:53

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 Issue Monitored: jfudickar
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


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