JVCL Help:TJvCustomAppStorage.OnTranslatePropertyName

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Event to translate the names under which the values were stored with the backend engine.


Pascal

 TJvAppStoragePropTranslateEvent = procedure (Sender: TJvCustomAppStorage; Instance: TPersistent; var Name: string; const Reading: Boolean) ofobject;
propertyOnTranslatePropertyName: TJvAppStoragePropTranslateEvent;


Parameters

Parameters Description
Name Name to be translated. The changed name is given back in the same parameter
Reading Flag if the appstorage instance is reading or writing in this moment. This flag is mainly for information. It has no change on the implementation.
Sender AppStorage Instance
Instance Instance of the Parent object which is stored


Description

This event can be used to translate the names under which the values were stored in the backend engine. For example: Storing a published property object property "Custo" can be translated to "Customer Number", which is more readable.


Examples

procedure TForm2.OptionsRegistryStorageTranslatePropertyName(
Sender: TJvCustomAppStorage; Instance: TPersistent; var Name: String;
const Reading: Boolean);
begin
if Name = 'DevNameEdit_Text' then
Name := 'Developer_Name'
elseif Name = 'MyNameEdit_Text' then
Name := 'My_Name'
elseif Name = 'BoolCheckBox_Checked' then
Name := 'This_Is_Boolean'
elseif Name = 'IntUpDown_Position' then
Name := 'This_Is_Integer';
end;


See Also

TJvAppStoragePropTranslateEvent


About

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page