View Issue Details

IDProjectCategoryView StatusLast Update
0002527JEDI VCL00 JVCL Componentspublic2005-02-07 13:11
ReporterJohnFrielAssigned Tojfudickar 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 BETA 2 
Target VersionFixed in Version3.00 
Summary0002527: 3.00 RC1 JvFormStorage creates multiple entries in registry for a form
DescriptionAs I open and close a form, additional registry entries are created :
ADOTestingDlg
ADOTestingDlg_1
ADOTestingDlg_2
etc...

the ending number keeps incrementing for every time I open and close this form. Code to create form is:

    with TADOTestingDlg.Create(Application) do
      show;

Each new entry in the Registry stores the dialog's position when it was closed, but all of them open in the center of the screen and the Position property for this dialog is poMainScreen. I tried tracing this one through but could not find where the extra _n was being added or why it wasn't loading the proper one without the _n appended.
Additional InformationAlso, for some reason, I am getting a single REG_SZ entry with the name of the first dialog box opened by my program in the root of the AppStorage Root property. This form is created and displayed before the Main Form displays, if that helps. There is no Data associated with the value and it is the name of the DBG001 form that does get stored correctly when it is closed. No other form is stored this way and deleting is just recreates it next time the app is started.
TagsNo tags attached.

Activities

jfudickar

2005-01-18 11:14

developer   ~0006213

Could you create a sample app for this?

2005-01-18 12:15

 

JVCLTEST.zip (12,335 bytes)

anonymous

2005-01-18 12:16

viewer   ~0006214

Uploaded a simple two-form application (src) to demonstrate the _n registry entries. Still working on creating the rogue REG_SZ entry...

JohnFriel

2005-01-18 14:33

reporter   ~0006218

Ok, figured out the rogue REG_SZ entry. Here's how to duplicate it:

New Form, drop a JvAppRegistryStorage and JvFormStorage on it.
Setup the AppRegistry Root property so you can find it with Regedit.
Setup JvFormStorage to use the Registry Storage component.
Click on the property editor for StoredValues and click the Create folder but do not edit any fields! (basically a blank record for StoredValues
Run the app, close the form.


You now have an entry in your registry that is the name of the form but it is stored one level higher than the Root specified. If anything, it should have been stored at the Root level in a folder named for the dialog. Hard to find this one because it should have ignored a Stored property with a blank or undefined name.

JohnFriel

2005-01-18 14:36

reporter   ~0006219

I also think I figured out the _n issue with the test application. It appears that if you create multiple Modeless dialogs that contain the component, it attempts to save each new iteration of the form in a seperate entry. When you close them all and start to recreate more, it places them in the last n positions until you create more than are stored in the registry.

I think this is a feature, but it would have been nice to document this somewhere.

The problem with the poMainForm thing I guess is the only unresolved issue. That and the JVCL HLP file needs M A J O R help.

jfudickar

2005-01-20 15:59

developer   ~0006236

The problem of empty storedvalues should be fixed now. Please test it and give us a feedback.

The problem with the n_1 works realy as defined. If you use the "%FORM_NAME%\" Storage path, it uses the name of the form. And if this name is created by default the this name is incremented.

obones

2005-02-04 01:48

administrator   ~0006381

Please test the latest version.
Should there be no answer from you in the next 7 days, we will consider this issue solved

JohnFriel

2005-02-07 12:14

reporter   ~0006437

Appears fixed. Thanks!
John

Issue History

Date Modified Username Field Change
2005-01-18 10:40 JohnFriel New Issue
2005-01-18 11:14 jfudickar Note Added: 0006213
2005-01-18 11:14 jfudickar Status new => feedback
2005-01-18 12:15 anonymous File Added: JVCLTEST.zip
2005-01-18 12:16 anonymous Note Added: 0006214
2005-01-18 14:33 JohnFriel Note Added: 0006218
2005-01-18 14:36 JohnFriel Note Added: 0006219
2005-01-20 15:57 jfudickar Status feedback => assigned
2005-01-20 15:57 jfudickar Assigned To => jfudickar
2005-01-20 15:59 jfudickar Note Added: 0006236
2005-01-20 15:59 jfudickar Status assigned => feedback
2005-02-04 01:48 obones Note Added: 0006381
2005-02-07 12:14 JohnFriel Note Added: 0006437
2005-02-07 13:11 jfudickar Status feedback => resolved
2005-02-07 13:11 jfudickar Resolution open => fixed