[Lazarus] const array syntax
Vincent Snijders
vsnijders at vodafonevast.nl
Mon Jan 18 07:29:28 CET 2010
Juha Manninen schreef:
> I was already thinking of moving all constants in SynEditKeyCmds and
> IDECommands to one unit and changing them to enum type, and then getting rid
> of this array and the similar EditorCommandStrs array.
> "WriteStr" is able to return the string representation of an enum.
> Is there any fundamental problem against doing so?
Just keep in mind that the string is used in saving the editor
preferences and must be kept stable, so old configs can be read. If you
rename the constant, you can decide in the current situation to keep the
string the same, but if it is an enum, you cannot.
Vincent
More information about the Lazarus
mailing list