Sign in Join

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

Mailing lists / lazarus / 2017-08

TFilenameedit onchange osx

9 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Andrea Mauri

Dear all,

I noticed that
TFilenameedit onchange event is raised differently between win-linux and osx.
Windows and Linux behave in the same way, osx differently.

Onchange event is raised on windows and linux when click ok after file selection. While on osx Onchange is raised only if I directly edit the tfilenameedit.

Additionally, I tried onacceptfilename. It is raised when I select a file using the dialog but TFilenameedit.Filename = '' (win, lin, osx).

Any hints?

Andrea Mauri

Reply by email

Denis Kozlov
to Andrea Mauri

FYI, there are few related bug reports about OnChange not firing correctly on Mac OS:
https://bugs.freepascal.org/view.php?id=24009 (year 2013) https://bugs.freepascal.org/view.php?id=30167 (year 2016)

Denis

Andrea Mauri wrote 17 lines
Dear all, I noticed that TFilenameedit onchange event is raised differently between win-linux and osx. Windows and Linux behave in the same way, osx differently. Onchange event is raised on windows and linux when click ok after file selection. While on osx Onchange is raised only if I directly edit the tfilenameedit. Additionally, I tried onacceptfilename. It is raised when I select a file using the dialog but TFilenameedit.Filename = '' (win, lin, osx). Any hints? Andrea Mauri

Reply by email

Andrea Mauri
to Denis Kozlov

any chance to fix them?
how can I help?

2017-08-23 10:24 GMT+02:00 Denis Kozlov :

Show quoted text 31 lines
FYI, there are few related bug reports about OnChange not firing correctly on Mac OS: https://bugs.freepascal.org/view.php?id=24009 (year 2013) https://bugs.freepascal.org/view.php?id=30167 (year 2016) Denis On 22/08/2017 15:34, Andrea Mauri via Lazarus wrote: > Dear all, > > I noticed that > TFilenameedit onchange event is raised differently between win-linux and > osx. > Windows and Linux behave in the same way, osx differently. > > Onchange event is raised on windows and linux when click ok after file > selection. While on osx Onchange is raised only if I directly edit the > tfilenameedit. > > Additionally, I tried onacceptfilename. It is raised when I select a file > using the dialog but TFilenameedit.Filename = '' (win, lin, osx). > > Any hints? > > Andrea Mauri >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170823/6d971d8d/attachment.html>

Reply by email

Juha Manninen
to Andrea Mauri
Andrea Mauri wrote
any chance to fix them? how can I help?

You can help by providing a patch that fixes them. A valid patch will be applied for sure.
I found other similar bug reports and marked them as related to the ones Denis listed.

Juha

Reply by email

Andrea Mauri
to Juha Manninen

Il 25/08/2017 12:06, Juha Manninen via Lazarus ha scritto:

Show quoted text 12 lines
On Wed, Aug 23, 2017 at 1:28 PM, Andrea Mauri via Lazarus wrote: > any chance to fix them? > how can I help? You can help by providing a patch that fixes them. A valid patch will be applied for sure. I found other similar bug reports and marked them as related to the ones Denis listed. Juha

I would. But I think that is out of my skills. Where should I look? Any starting point?
I can se this bug only on osx, and I opened my first mac last week ;-)

Andrea

Reply by email

Juha Manninen
to Andrea Mauri
Andrea Mauri wrote
I would. But I think that is out of my skills. Where should I look? Any starting point?

I don't know. I don't have a Mac.
In general contributors / developers just have to learn the code by debugging and experimenting, little by little. There is no shortcut for it really.

I can se this bug only on osx, and I opened my first mac last week ;-)

Ok, congratulations. :)
That may hinder the development of course. You must learn the OS, then setup the debugging environment and whatever is needed. I don't know details, I only read that people had trouble debugging there.

Mac development has advanced slowly. Especially Cocoa should be improved ASAP.

Juha

Reply by email

Andrea Mauri
to Juha Manninen: On Fri, Aug 25, 2017 at 1:29 PM, Andrea Mauri via Lazarus I don't know. I don't have a…

Il 25/08/2017 19:15, Juha Manninen via Lazarus ha scritto:

Show quoted text 6 lines
I don't know. I don't have a Mac. In general contributors / developers just have to learn the code by debugging and experimenting, little by little. There is no shortcut for it really.

Got it.

Show quoted text 6 lines
Ok, congratulations. :) That may hinder the development of course. You must learn the OS, then setup the debugging environment and whatever is needed. I don't know details, I only read that people had trouble debugging there.

Yes, there are some issues with debugging. Finally I got gdb workince lldb ing xcode is worse than gdb with lazarus.

What about the fpdebugger?

Mac development has advanced slowly. Especially Cocoa should be improved ASAP.

+1

Juha

Reply by email

Dmitry Boyarintsev
to Denis Kozlov: FYI, there are few related bug reports about OnChange not firing correctly on Mac OS:…

On Wed, Aug 23, 2017 at 4:24 AM, Denis Kozlov via Lazarus <

Show quoted text 7 lines
wrote: FYI, there are few related bug reports about OnChange not firing correctly on Mac OS: https://bugs.freepascal.org/view.php?id=24009 (year 2013) https://bugs.freepascal.org/view.php?id=30167 (year 2016)

This is a common Carbon behavior (and Cocoa as well). Carbon "change" event is only triggered whenever an actual user input occurred.
LCL OnChange event is triggered for both an actual user input or a programmatic change.

Naturally, WSCarbon needs to updated to trigger LCL OnChange event whenever a programmatic change occurs.

To be honest, it's surprising to see these issues again (a regression?) since they've been worked on back in 2009-2010.
I might be wrong though, since similar problem might have been reported for TMemo, TComboBox (rather than TEdit)

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170831/44e765ca/attachment.html>

Reply by email