[Lazarus] Bug when using frames

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Bug when using frames

Free Pascal - Lazarus mailing list

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.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Bug when using frames

Free Pascal - Lazarus mailing list
On 15.04.2019 09:52, Michael Van Canneyt via lazarus wrote:
> Before I dive in the bugtracker and create 3 bug reports, are these
> known issues ?


I don't know if there are bug reports about it but I have been facing
the same issues ever since as well. I didn't have the motivation to work
on them, though.

I rather create all my frames in runtime, which I also did in Delphi.
Even Delphi lost properties/events (set event handlers to nil) of
controls in frames quite frequently.

Ondrej

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Bug when using frames

Free Pascal - Lazarus mailing list
On Mon, Apr 15, 2019 at 5:06 AM Ondrej Pokorny via lazarus
<[hidden email]> wrote:
> ...
> I rather create all my frames in runtime, which I also did in Delphi.
> Even Delphi lost properties/events (set event handlers to nil) of
> controls in frames quite frequently.

+1
Much better create them, docking on a panel, in runtime only.

Marcos Douglas
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Bug when using frames

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Mon, Apr 15, 2019 at 10:52 AM Michael Van Canneyt via lazarus
<[hidden email]> wrote:
> When you work with frames, you cannot change the frame in the designer when
> the frame is used in other frames/forms.

Maybe related to :
 https://bugs.freepascal.org/view.php?id=20026
or
 https://bugs.freepascal.org/view.php?id=12483

Juha
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Bug when using frames

Free Pascal - Lazarus mailing list


On Mon, 15 Apr 2019, Juha Manninen via lazarus wrote:

> On Mon, Apr 15, 2019 at 10:52 AM Michael Van Canneyt via lazarus
> <[hidden email]> wrote:
>> When you work with frames, you cannot change the frame in the designer when
>> the frame is used in other frames/forms.
>
> Maybe related to :
> https://bugs.freepascal.org/view.php?id=20026
> or
> https://bugs.freepascal.org/view.php?id=12483

Yep. Good that I asked first :)

I added a feature request for 'revert to inherited'.

Thanks !

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus