Recent

Author Topic: Why TForm.OnDropFiles is not called on double-click in Finder?  (Read 220 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 1961
    • UVviewsoft
Why TForm.OnDropFiles is not called on double-click in Finder?
« on: September 17, 2022, 01:51:10 pm »
I have a regression in CudaText editor: double-click in Finder, or 'Open with' in Finder - they don't call TFormMain.OnDropFiles with the clicked file. So editor cannot open associated document!

OnDropFiles _is_ still called OK when I drag-drop the document from Finder.
OnDropFiles _is_ still called OK in empty form demo. (So not a Lazarus regression.)
TForm.AllowDropFiles is on.

I cannot get the idea, what I broke.
.plist file is still the same (3 years).
macOS-specific code was not added to app in last years.
Any ideas?

macOS 10.8 and 11.x. Lazarus 2.2 release and 2.3 trunk.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1998
  • Former Delphi 1-7, 10.2 user
Re: Why TForm.OnDropFiles is not called on double-click in Finder?
« Reply #1 on: November 20, 2022, 02:37:23 pm »
Perhaps this paragraph from my Wiki article on macOS File and Custom URL Scheme Associations relates to your issue?
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 x86_64 Xcode 13.4
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 aarch64 Xcode 13.4

AlexTP

  • Hero Member
  • *****
  • Posts: 1961
    • UVviewsoft
Re: Why TForm.OnDropFiles is not called on double-click in Finder?
« Reply #2 on: November 20, 2022, 02:48:37 pm »
This wiki text tells
>It should be noted that the legacy keys are still working in macOS 10.15.4 (Catalina).

So my old Info.plist file must be OK for macOS 10.11 and 10.8. So, it is not the reason.

 

TinyPortal © 2005-2018