Recent

Author Topic: onKeyPress on Mac  (Read 5434 times)

Arbee

  • Full Member
  • ***
  • Posts: 223
onKeyPress on Mac
« on: December 09, 2010, 11:06:51 am »
I cpouldn't find this one in another topic, so Therefore my question....

I have a small onKeyPress event on an Edit Field where I want the text to be always in uppercase. 


procedure TEditRatesDialog.RateIDEditKeyPress(Sender: TObject; var Key: char);
begin
   Key := upcase(Key);
end;

Maybe this can be done in another way but that is not the point here .... What I observe is that this code works fine on Windows, but on the Mac it does not.
I can see that the onKeyPress is fired alright, but on the Mac the change to the key is not passed back and is not reflected in the Edit field.

I use 0.9.28/2.2.4 on both platforms (XP and OS X 10.6.5)
 
Is this a known issue?

1.0/2.6.0  XP SP3 & OS X 10.6.8

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: onKeyPress on Mac
« Reply #1 on: December 09, 2010, 09:35:10 pm »
Please test with the current Lazarus. What you have is over a year old.

If it still doesn't work the same as on Windows, please post a bug report (see Bugtracker at left).

In the meantime, for that particular behavior you want, try changing the TEdit's CharCase property.

Thanks.

-Phil

Arbee

  • Full Member
  • ***
  • Posts: 223
Re: onKeyPress on Mac
« Reply #2 on: December 10, 2010, 02:03:11 pm »
Hmmm ... Have been installing them from the "official" download page, just a month ago when restarting to use lazarus after 2.5 years of using another framework (C++ / WxWidgets).

I can of course load a daily snapshot but the warning text on that page really can put a guy off from ever using that.  Sounds like the chance of introducing bigger problems than the one I'm reporting here is substantial.  Can you reassure me there?

I assume the official download page is the latest stable release.  You're telling me there hasn't been a stable release since?
1.0/2.6.0  XP SP3 & OS X 10.6.8

Arbee

  • Full Member
  • ***
  • Posts: 223
Re: onKeyPress on Mac
« Reply #3 on: December 10, 2010, 11:19:01 pm »
OK, I did it anyway and installed the latest snapshot on my wife's macbook.  No harm done if it would screw up everything there (don't tell her!).

In 0.9.29 OnKeyPress works as expected.
1.0/2.6.0  XP SP3 & OS X 10.6.8

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: onKeyPress on Mac
« Reply #4 on: December 11, 2010, 05:54:43 pm »
That's good to hear.

As I understand it, if all of the bug reports that are tagged 0.9.30 get fixed this month, there will be another stable release on New Year's Day.

http://bugs.freepascal.org/roadmap_page.php

Thanks.

-Phil

 

TinyPortal © 2005-2018