I have an component that needs to have a default value for a published string property.

Currently, the property value is initialized in the constructor:

MyProperty := 'MyDefaultValue';

The value of the property is stored in the *.lfm file.

Things work fine until i try to set MyProperty to an empty string through the OI.

The MyProperty value ('') is not stored in the lfm and when the project is reloaded MyProperty resets to the 'MyDefaultValue'.

Is there a way to always store a property in lfm even for ''?

Is there a better approach to handle default values for published string properties?

Luiz


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to