[Lazarus] How to clone a component
DrDiettrich1 at aol.com
Thu Oct 4 17:29:25 CEST 2012
> The copied (original) component's events are fine. However, it is the
> clone's events which are not as desired. Its methods code+data are equal
> to the original component's methods code+data whereas the data part
> should point to the clone itself for proper operation of the clone. Any
> ideas on how this should be handled?
I don't think that the clipboard should contain pointers, which become
invalid as soon as the referenced form is closed.
The data pointer should refer to the *form* containing the cloned
component. When that form doesn't have the named method, the handler
reference may be cleared.
More information about the Lazarus