[Lazarus] Bug when using frames

Michael Van Canneyt michael at freepascal.org
Mon Apr 15 09:52:42 CEST 2019


Hi,

When you work with frames, you cannot change the frame in the designer when
the frame is used in other frames/forms.

- Create frame. 
- Add Control on frame (eg button)
- Drop frame on a form or frame, keep open
- Add event handler in original frame (e.g. Button.OnClick)
-> event handler is set to Nil in the form where the frame is dropped.

3 issues:

1. The form/frame on which the frame is dropped should not set the event handler to Nil to begin with.

2. There is no way to restore the 'original state' of the frame.
    Delphi has a 'Revert to inherited' context menu.

3. To fix this, I do a  'View Source .lfm' and remove the Nil event handlers
    (OnClick = Nil) but that does not work, it keeps setting the event handlers to Nil.

So now I quit lazarus, manually edit the .lfms and simply remove all superfluous
properties from it. i.e. I do what a  'Revert to inherited' context menu
would do, manually. Then I restart lazarus and force a build (compile is not enough)

Far from ideal :(

Before I dive in the bugtracker and create 3 bug reports, are these known issues ?

Michael.


More information about the lazarus mailing list