Lazarus

Programming => Operating Systems => macOS / Mac OS X => Topic started by: HenrikErlandsson on September 09, 2019, 04:24:06 pm

Title: Form focus problem with TEdit: Nothing happens when I type into it
Post by: HenrikErlandsson on September 09, 2019, 04:24:06 pm
I've imported an old Delphi project. First on Mac, but could find no import option that didn't throw the "fatal error repairing the main .lfm". On Windows, the conversion worked fine. When I compile that on Mac, it starts and everything looks good, but all TEdit boxes across several forms behave as in title. Read-only is of course set to false.

I'm using the cocoa widgetset. I tried reproducing it by creating a new Application, placing a TEdit on the form and using cocoa and {$MODE Delphi} to compile, but then I can type into the control.

I also tried deleting the control, then re-adding it (in the form designer), but even this gives the same behavior (can't type into it).

It seems to be a form focus problem, because if I have a text editor open before I compile and run, the text I type ends up in the editor, even though the form looks active, is in front, and I have clicked on the form. The form also has an OK button, but that responds to clicks and behaves normally.

When I start the program, no icon appears in the Dock, even though I've supplied a program icon. Is that it, and how do I fix it?

fpc 3.0.4, Lazarus 2.0.4, OSX 10.14.4, XCode 10.2.1
Title: Re: Form focus problem with TEdit: Nothing happens when I type into it
Post by: trev on September 12, 2019, 09:27:57 am
I had focus issues with Tedit in Cocoa which Dmitry fixed for me in Lazarus trunk (3.3.1).

Try trunk? (It includes other Cocoa fixes too.)
TinyPortal © 2005-2018