[Lazarus] Buttons in frames

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Thu Jan 31 12:39:03 CET 2013


Mattias Gaertner wrote:
> Hans-Peter Diettrich <DrDiettrich1 at aol.com> hat am 31. Januar 2013 um 11:45
> geschrieben:
>> Mark Morgan Lloyd schrieb:
>>
>>>>> When the program runs, the form is created and displayed and the
>>>>> modal cancel button works, but none of the other events fire in
>>>>> response to user actions. This is with Lazarus trunk + 2.6.0.
>>> 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.
>> Event handlers are installed from the LFM file. If you don't have one,
>> or don't $Read it, no handlers will be hooked in during creation. Also
>> all other properties will have default values, then.
> 
> TFrame raises an exception if no resource was found.
> 
> Probably the program uses the old .lrs files {$i frameunit.lrs}

Yes, found 'em. What should I be doing for new versions of Lazarus: 
removing the $i and inserting $r? If so is there a conditional that will 
allow me to automate it depending on version?

-- 
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