View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002672 | JEDI VCL | 00 JVCL Components | public | 2005-02-21 06:43 | 2005-02-24 07:16 |
Reporter | plamendp | Assigned To | jfudickar | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Target Version | Fixed in Version | 3.00 | |||
Summary | 0002672: 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. | ||||
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 |