[Lazarus] Buttons in frames

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Wed Feb 6 20:06:55 CET 2013


Mattias Gaertner wrote:
> Mark Morgan Lloyd <markMLl.lazarus at telemetry.co.uk> hat am 31. Januar 2013 um
> 11:38 geschrieben:
>> Mattias Gaertner wrote:
>>> On Thu, 31 Jan 2013 10:00:31 +0000
>>> Mark Morgan Lloyd <markMLl.lazarus at telemetry.co.uk> wrote:
>>>
>>>> [...]
>>>>> It should work.
>>>>>
>>>>> Can you create a small example to demonstrate the problem?
>>>> I can't duplicate it with a newly-created test program. However I notice
>>>> that this program has implementation ... {$R *.lfm} in (at least)
>>>> those units with forms, while the program giving the problem doesn't.
>>>> Any thoughts would be appreciated before I wade in trying to "fix" things.
>>> Is the OnClick event of the button assigned at runtime?
>> No. At frame design time, and then the frame is placed on the form (I've
>> previously been caught by frame updates not propagating to frames which
>> are already on forms) and set to client alignment. Save and build.
> 
> Set a breakpoint in TCustomFrame.Create and single step to see what is executed.

Going back to this, r40191 shows me that event handlers were not being 
saved in the frame (OnClick event etc.) but reselecting those seems to 
have fixed it. So there might have been an issue in some revisions of trunk.

One thing that I'm now getting (at least up to r40200) is that when the 
IDE reads a form containing a frame I get a dialog telling me the .lfm 
can't be found:

Unable to find the component class "TDbConfigFrame".
It is not registered via RegisterClass and no lfm was found.
It is needed by unit:
/usr/local/src/inifiles/trunk/dbconfigcode.pas

However aborting/cancelling the load appears to have the effect of 
making the load complete, the project is intact and compilable. This 
doesn't appear to be related to my use of a symlink.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list