[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'IniPropStorage' (#lcl)

TCustomIniPropStorage.StorageNeeded

Creates or recreates the underlying INI file storage for the class instance.

Declaration

Source position: inipropstorage.pas line 41

public procedure TCustomIniPropStorage.StorageNeeded(

  ReadOnly: Boolean

); override;

Arguments

ReadOnly

  

True if the INI file allows read-only access.

Description

StorageNeeded is an overridden Boolean function in TCustomIniPropStorage. It ensures that the IniFile property is created or recreated when the method is called. The value in the ReadOnly argument is assigned to an internal member in the class instance; IniFile is recreated if the value in the member has been changed since the class was created.

Remark: IniFile is not created or stored in the class instance at design-time.

StorageNeeded is called from methods in ancestor classes when the Active property is enabled, including: Save, Restore, SaveProperties, RestoreProperties, ReadString, WriteString, ReadInteger, WriteInteger, and EraseSection.

See FreeStorage for the actions performed when the storage for the class instance is no longer needed.

Use Active to control whether access using the INI file storage is enabled.

Use IniFileName to specify the qualified path including file name for the INI file storage.


Version 4.0 Generated 2025-05-03 Home