[Lazarus] Invalid component names

Hans-Peter Diettrich DrDiettrich1 at aol.com
Mon Apr 27 13:55:36 CEST 2009


Vincent Snijders schrieb:
>> Exactly this code will cause an exception, when the procedure is called
>>  more than once - as I need it to create multiple floating controls.
> 
> Why do you want to give the controls names?

Names are convenient to identify floating windows (label title bars) or 
docked controls (dock header label), and are required for the 
de/serialization of docking layouts.

But you are right in so far, as dynamically created controls are of 
little use in the recreation of a docking layout. In this case the names 
should be hardwired somehow, so that the appropriate controls can be 
created from the stored layout. I'll have to re-think this issue in the 
implementation of multiple editor windows and the related forms. Then 
e.g. the code explorer windows etc. must be linked to the edit control 
in their dock site, regardless of their name in creation order.

DoDi




More information about the Lazarus mailing list