[Solved] Bug with Cocoa application-delegate class? lazarus / 66-Unix ---------------------------------------------------------------------- AlexTP · 2022-09-15 15:37 MacOS 10.8 and 11.x. I see a regression in CudaText,--  app don't get TForm.OnDropFiles when I run the editor from Finder (dbl click on text file or do 'open with'). App runs but don't get OnDropFiles. I added the Application.MessageBox here: lazarus/lcl/interfaces/cocoa/cocoaobject.inc Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAppDelegate.application_openFiles(sender: NSApplication; filenames: NSArray);var  lFiles: array of string;  lNSStr: NSString;  i: Integer;begin  SetLength(lFiles, filenames.count);  for i := 0 to filenames.count-1 do  begin    lNSStr := NSString(filenames.objectAtIndex(i));    lFiles[i] := NSStringToString(lNSStr);  end;  Application.MessageBox('App openFiles, cnt: '+IntTOstr(filenames.count), 'Cocoa'); //debug  Application.IntfDropFiles(lFiles);  if Application.MainForm<>nil then    Application.MainForm.IntfDropFiles(lFiles);end;  and msgbox is not called! Maybe a regression in FPC? This procedure is in the cocoa/cocoaint.pas: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   TAppDelegate = objcclass(NSObject, NSApplicationDelegateProtocol)  public    orderArray : PWinLevelOrderArray;    orderArrayCount : Integer;    procedure application_openFiles(sender: NSApplication; filenames: NSArray);  I do cross compile from Linux x64 to Mac. user@PC:~/fpcupdeluxe/fpcupdeluxe32/fpc/bin/x86_64-linux$ ./fpc Free Pascal Compiler version 3.2.3-660-g9b2ba834a6 [2022/08/18] for x86_64 It is 'fixes' branch. ---------------------------------------------------------------------- AlexTP · 2022-09-15 17:57 Sorry, problem seems not in FPC, 3.2 release shows the same.