View Issue Details

IDProjectCategoryView StatusLast Update
0002228JEDI VCL00 JVCL Componentspublic2004-10-17 12:16
ReporterkorecekAssigned Tojfudickar 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 BETA 2 
Target VersionFixed in Version3.00 RC 1 
Summary0002228: TJvFormStorage and ComboBox String Items
DescriptionSteps:
1. Create application
2. Put a ComboBox on a Form
3. Put TJvAppIniFileStorage and TJvFormStorage
4. Add some String Items to the ComboBox
5. Set TJvAppIniFileStorage:
     a. AutoFlush=AutoReload = true
     b. Set DefaultSection "General"
     c. FileName = "FileIni.ini"
6. Set TJvFormStorage:
     a. Active = true;
     b. AppStoregePath = "General\"
     c. Set StoredProps: "ComboBox.Text" and "ComboBox.Items"
7. Run Application and look at the ComboBox DropDown Items.
   There is no string in the ComboBox except the Text item.
8. Close application. There is no Item in the FileIni.ini.
I think, it is first run application bug because
the mentioned "FileIni.ini" don't exist yet during first start of app.
Additional InformationIf you deactivate JvFormStorage->Active in design time
and allow it in OnShow function, it seems to be OK. But,
I would like to have JvFormStorage activated already in
design time.
Sample application source is in BCB. :-(
TagsNo tags attached.

Activities

2004-10-15 13:07

 

ComboStorage.zip (4,283 bytes)

jfudickar

2004-10-16 06:04

developer   ~0005401

Changed as discussed. If the key doesn't exists in the storage, no data is loaded.

Please check it.

korecek

2004-10-16 10:43

reporter   ~0005404

I checked it.
Now it works really well if "FileIni.ini" don't exist during first app. start
but, there is problem that component don't read values from file if
"FileIni.ini" already exist.
My test:
1. JvFormStorage->Active is set true in design time.
2. First run app. create a new FileIni.ini:
3. Close app. and look at the file. It looks this way ->
[General]
FormVersion=0
ComboBox_Text=Item1
General=

[General\ComboBox_Items]
Count=5
Item0=Item1
Item1=Item2
Item2=Item3
Item3=Item4
Item4=Item5
4. Change "FileIni.ini" manually this way (for examle):
[General]
FormVersion=0
ComboBox_Text=new
General=

[General\ComboBox_Items]
Count=6
Item0=Item1
Item1=Item2
Item2=Item3
Item3=Item4
Item4=Item5
Item5=News

5. Run application again. Changes weren't applied in runtime. Now we can go
to point 3 above.

I also added new strings in runtime. It stored new values after app. closing but
it did not read stored values again. :-(

jfudickar

2004-10-16 13:40

developer   ~0005409

Please check again. :-)

Now it should also work with ini-files.

korecek

2004-10-17 04:20

reporter   ~0005413

I have checked it again.
OK. ;-)
Now, it works properly in my opinion.

Thanks

Issue History

Date Modified Username Field Change
2004-10-15 13:07 korecek New Issue
2004-10-15 13:07 korecek File Added: ComboStorage.zip
2004-10-16 04:11 jfudickar Status new => assigned
2004-10-16 04:11 jfudickar Assigned To => jfudickar
2004-10-16 06:04 jfudickar Note Added: 0005401
2004-10-16 10:43 korecek Note Added: 0005404
2004-10-16 13:40 jfudickar Note Added: 0005409
2004-10-17 04:20 korecek Note Added: 0005413
2004-10-17 12:16 jfudickar Status assigned => resolved
2004-10-17 12:16 jfudickar Resolution open => fixed