Author Topic: Form focus problem with TEdit: Nothing happens when I type into it  (Read 505 times)


  • New Member
  • *
  • Posts: 19
  • ^ Happy coder :)
Form focus problem with TEdit: Nothing happens when I type into it
« 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
Turbo Pascal was the tool of my trade as a young professional.


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1053
  • Former Delphi 1-7, 10.2 User
Re: Form focus problem with TEdit: Nothing happens when I type into it
« Reply #1 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.)
o Lazarus v2.1.0 r63871, FPC v3.3.1 r47164, macOS 10.14.6, Xcode 11.3.1
o Lazarus v2.1.0 r64160, FPC v3.3.1 Nov 27 21:16:31, macOS 11.0.1 (aarch64), Xcode 12.2
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware VM)
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 20.04 (PD VM)


TinyPortal © 2005-2018