I have a problem with the SetFocus - command in an Onexit-routine. I have written a little Testprogramm to demonstrate the error.
3 TEdit-fields in a form.
In the Onexit-routine of the first field the following commands are integrated:
If Edit1.Text = '' then begin
Error := 'No input';
Edit1.SetFocus;
exit;
end;
If Edit1.Text = 'OK' then
Edit3.SetFocus
ELSE
Edit2.SetFocus;
In Windows this routine works correctly.
In the MAX OS X Version LCL Widget Type = carbon this routine doesn't work.
Is Edit1.Text = '' then Edit1 and Edit2 are marked, two cursor are blinking, one in Edit1 and one in Edit2; the keyboard input is inserted in Edit2.
But when I set a breakpoint in the first line of the Onexit-routine, this routine works also correctly.
I can't find the mistake! Can you help me?
My lazarus Version: FPC 2.4.0, Lazarus SVN Revision 28017.