Recent

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

HenrikErlandsson

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

trev

  • Full Member
  • ***
  • Posts: 185
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 r61775, FPC v3.3.1 r42640, macOS 10.14.6 (with sup update), Xcode 10.3
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.0 (Parallels VM)
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)