Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Use of LMDStorPropertiesStorage..

HI Team,
I have a LMDStorPropertiesStorage on my main form but I also want to save some properties of components on a second form.
Is there any way to access the first form.LMDStorPropertiesStorage from the second form?
Alternatively, if I need a LMDStorPropertiesStorage on each form, how can I tell the second to use the LMDStorINIVault from the first form..:-)

Regards & TIA,
Ian

Comments

  • 5 Comments sorted by Votes Date Added
  • The key is to use DataModules for Vault-controls. Once placed on a datamodule, you can include it in any number of forms with Storagecontrols. 
  • Hi Rafael,
    Ahh.  Had me going for a minute there 'till I re-read a couple of times and realised you were referring to the LMDStorINIVault.
    Totally forgot about DMs, haven't used one for a while..:-)
    All good now Tks.
    Regards,
    Ian

  • Ahhh.  Maybe not.
    Have the StorPropertiesStorage in each of the forms linked to the StorINIVault in the DM, but I am not getting any .ini created and therefore no props stored/restored.

    Can't see any properties that I have missed.

    Thoughts?

    Regards,
    Ian
  • edited October 2015 Posts: 0 Accepted Answer Vote Up0Vote Down
    >>Can't see any properties that I have missed.<<
    I guess you didn't disabled AutoLoad/AutoSave. You need to manually call Load/save for PropertiesStorage when used with DataModules (in ControllerVault demo project this is demonstrated.

    However: please forgive me, this approach is only supported by the FormPropertiesStorage control (which is able to use different sections - see the corresponding demo). 
    While it will work generally for normal PropertiesStorage control, you need to make sure that all control names are different (because always the same section is used). So sorry, a recommended automatic way for sharing does not exist (to handle this manually - check the Sections demo which allows to define different sections).

  • Hi Rafael,
    OK.  Now we're cookin.
    Added the StorControllerVault to the DM and all working as desired.
    Many Thanks again.

    Ian
Sign In or Register to comment.