Recent

Author Topic: TIniPropStorage and Ancestors - why and how?  (Read 4164 times)

lt.col.blair

  • New Member
  • *
  • Posts: 15
TIniPropStorage and Ancestors - why and how?
« on: November 15, 2010, 01:13:22 pm »
Hi,
I've been programming in Delphi the past 14 Years, but now I'm new to Lazarus.

Today I tripped over the component "TIniPropStorage".
Immediately I looked into it's ancestry:

TIniPropStorage <- TCustomIniPropStorage <- TFormPropertyStorage <- TControlPropertyStorage <- TCustomPropertyStorage <- TCustomPropertyStorage
... wow.
I wonder, when and how to use this component and why it has such a long ancestry.
Especially the names of the ancestors (FormPropertyStorage and ControlPropertyStorage) seem to imply, that some other components use this one to save their properties?
Could anyon enlighten me, when or how to use this component most effectively?
Thanks

Leledumbo

  • Hero Member
  • *****
  • Posts: 8432
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: TIniPropStorage and Ancestors - why and how?
« Reply #1 on: November 15, 2010, 02:32:26 pm »
Quote
I wonder, when and how to use this component
When you want to store your form's properties (or the controls in it), the damn easy way. Just use SessionProperties property of the form and you have it :)
Quote
why it has such a long ancestry. Especially the names of the ancestors (FormPropertyStorage and ControlPropertyStorage) seem to imply, that some other components use this one to save their properties?
The long ancestry IMHO is to allow things like you said. First, there are at least two FormPropertyStorage descendants (skipping the custom version), the one you're talking about, TIniPropStorage, and XML based one, TXMLPropStorage. Second, property storage might be required by a non-form controls, such as TWebModule.

 

TinyPortal © 2005-2018