Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-10

Carbon: 10.4.11 tab key hangs on 10.5.4

8 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

EarMaster - Bent Olsen

Hi all,

I'm not sure if this was already brought up, and I did search bug tracker - with no luck.

I've noticed that many native Mac OS X controls no longer receives focus in 10.5.4, which also can be seen in applications like Safari - you simply can't tab through all controls on HTML pages and toolbars as you can in 10.4.x, and only edit boxes seem to get focus.

This affects applications compiled with 10.4.11 and trying to run on 10.5.4
- you can test this by placing a TButton on a empty form, compile it with Lazarus on 10.4.11, and run the application on 10.5.4 - then hit tab key. It simply hangs, because there is nothing on the form to receive focus anymore
- as there would in 10.4.11.

This test wouldn't crash if you placed a couple of edit boxes, which could receive the focus - but the button no longer get focused, which it usually did in 10.4.11.

I have FPC 2.2.2, Lazarus 0.9.27 r16996 on i386-darwin-carbon. I have no FPC/Lazarus installed on 10.5.4, so I can test this the other way around.

We can workaround the focus issue, but not if it hangs every time the user hits the tab key.

Has anyone come across this problem, and found a solution for it?

Best regards,
Normann

Reply by email

Tom Gregorovic
to EarMaster - Bent Olsen
EarMaster - Bent Olsen wrote 28 lines
Hi all, I'm not sure if this was already brought up, and I did search bug tracker - with no luck. I've noticed that many native Mac OS X controls no longer receives focus in 10.5.4, which also can be seen in applications like Safari - you simply can't tab through all controls on HTML pages and toolbars as you can in 10.4.x, and only edit boxes seem to get focus. This affects applications compiled with 10.4.11 and trying to run on 10.5.4 - you can test this by placing a TButton on a empty form, compile it with Lazarus on 10.4.11, and run the application on 10.5.4 - then hit tab key. It simply hangs, because there is nothing on the form to receive focus anymore - as there would in 10.4.11. This test wouldn't crash if you placed a couple of edit boxes, which could receive the focus - but the button no longer get focused, which it usually did in 10.4.11. I have FPC 2.2.2, Lazarus 0.9.27 r16996 on i386-darwin-carbon. I have no FPC/Lazarus installed on 10.5.4, so I can test this the other way around. We can workaround the focus issue, but not if it hangs every time the user hits the tab key. Has anyone come across this problem, and found a solution for it?

I think it is simillar to
http://mantis.freepascal.org/view.php?id=10054 . I don't have 10.5 version, but I think there is same option under Keyboard settings. I have not found how to detect this settings so far. But it should not certainly hang.

Tom Gregorovic

Reply by email

EarMaster - Bent Olsen
to Tom Gregorovic
Show quoted text 7 lines
I think it is simillar to http://mantis.freepascal.org/view.php?id=10054 . I don't have 10.5 version, but I think there is same option under Keyboard settings. I have not found how to detect this settings so far. But it should not certainly hang. Tom Gregorovic

Hi Tom,

I didn't knew about this option under Keyboard settings, but that's exactly what makes it hang - it doesn't crash, just hangs until you "use the Force" Quit.

I applied the same settings for my Mac with 10.4.11, and this makes it hang too - even with a small test program with nothing on it but a TButton.

I noticed in the Mantis a fix is targeted to 1.0, but could I (until then) be able to work around this by capturing the key event for VK_TAB and make the controls ignore this on certain forms? I could try...

Or maybe I could investigate a little bit more about this setting.

Best regards,
Normann

Reply by email

EarMaster - Bent Olsen
to Tom Gregorovic: On Wed, Oct 29, 2008 at 12:20 PM, EarMaster - Bent Olsen I think it is simillar to…
Show quoted text 7 lines
I think it is simillar to http://mantis.freepascal.org/view.php?id=10054 . I don't have 10.5 version, but I think there is same option under Keyboard settings. I have not found how to detect this settings so far. But it should not certainly hang. Tom Gregorovic

Hi Tom,

I managed to detect this specific keyboard setting by:

var
  FResult: CFIndex;
  FValid: Boolean;
  FResult := CFPreferencesGetAppIntegerValue(CFSTR('AppleKeyboardUIMode'),
kCFPreferencesCurrentApplication, FValid);

FResult turn out to be bit flags:
Bit 0 is set if feature is on
Bit 1 is set if full keyboard access works for any control, not just text boxes and lists

And these are of course flipped by:
^F1 flips bit 0
^F7 flips bit 1

Hope you can use this to detect the "Full Keyboard Access".

Best regards,
Normann

Reply by email

Tom Gregorovic
to EarMaster - Bent Olsen
EarMaster - Bent Olsen wrote 32 lines
> I think it is simillar to > http://mantis.freepascal.org/view.php?id=10054 . I don't have 10.5 > version, but I think there is same option under Keyboard settings. I > have not found how to detect this settings so far. But it should not > certainly hang. > > Tom Gregorovic Hi Tom, I managed to detect this specific keyboard setting by: var FResult: CFIndex; FValid: Boolean; FResult := CFPreferencesGetAppIntegerValue(CFSTR('AppleKeyboardUIMode'), kCFPreferencesCurrentApplication, FValid); FResult turn out to be bit flags: Bit 0 is set if feature is on Bit 1 is set if full keyboard access works for any control, not just text boxes and lists And these are of course flipped by: ^F1 flips bit 0 ^F7 flips bit 1 Hope you can use this to detect the "Full Keyboard Access".

Yes, this would help. I will fix it tomorrow. I want you to be listed in Lazarus contributors list - what is your full name?

Tom Gregorovic

Reply by email

EarMaster - Bent Olsen
to Tom Gregorovic
Yes, this would help. I will fix it tomorrow. I want you to be listed in Lazarus contributors list - what is your full name? Tom Gregorovic

Good, I'm glad I could help, and I hope can assist more often when I get deeper and deeper into Lazarus ;-)

My full name is "Bent Normann Olsen".

Thanks, and best regards,
Normann

Reply by email

Tom Gregorovic
to EarMaster - Bent Olsen
EarMaster - Bent Olsen wrote 9 lines
> Yes, this would help. I will fix it tomorrow. I want you to be listed > in Lazarus contributors list - what is your full name? > > Tom Gregorovic Good, I'm glad I could help, and I hope can assist more often when I get deeper and deeper into Lazarus ;-) My full name is "Bent Normann Olsen".

Thanks, it should be fixed in latest SVN version.

Tom Gregorovic

Reply by email