(SOLVED) OSX and ShowModal problema lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- xinyiman · 2016-07-28 06:14 Hello guys. I have a question. On Mac systems if I open a modal form and then execute a ShowMessage, the message goes into the background because of the modal form and then the program stops. How can I overcome this problem? There is some property somewhere that avoids me this problem? Thank you ---------------------------------------------------------------------- Phil · 2016-07-28 11:45 Sounds like this longtime Lazarus bug: http://mantis.freepascal.org/view.php?id=29694 Applying the patch and rebuilding LCL should fix it. Rebuild Laz too since it's affected by this bug as well. ---------------------------------------------------------------------- xinyiman · 2016-07-28 12:15 Thank you, with what command I apply the patch? ---------------------------------------------------------------------- Phil · 2016-07-28 12:23 A text editor? It's just a few lines that need to be commented out in one file. ---------------------------------------------------------------------- xinyiman · 2016-07-28 12:35 This is patch 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 Index: lcl/ interfaces/carbon/carbonwsforms.pp==================================== ===============================--- lcl/interfaces/carbon/carbonwsforms.pp      (revision 51666)+++ lcl/interfaces/carbon/carbonwsforms.pp      (working copy)@@ -141,19 +141,11 @@  ---------------------------------------------------------- --------------------} class function TCarbonWSCustomForm.CreateHandle(const AWinControl: TWinControl;   const AParams: TCreateParams): TLCLIntfHandle;-var-  frm : TCustomForm; begin   if IsFormDesign(AWinControl) then     Result := TLCLIntfHandle(TCarbonDesignWindow.Create(AWinControl, AParams))   else     Result := TLCLIntfHandle(TCarbonWindow.Create(AWinControl, AParams));-  frm:=TCustomForm(AWinControl);-  if Assigned(frm) then-  begin-    if (AParams.WndParent<>0) and ((AParams.Style and WS_CHILD) = 0) then-      SetWindowGroup(TCarbonWindow(Result).Window, GetWindowGroupOfClass(kHelpWindowClass));-  end; end;  {-------------- ----------------------------------------------------------------   this is my code 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 class function TCarbonWSCustomForm.CreateHandle(const AWinControl: TWinControl;  const AParams: TCreateParams): TLCLIntfHandle;var  frm : TCustomForm;begin  if IsFormDesign(AWinControl) then    Result := TLCLIntfHandle(TCarbonDesignWindow.Create(AWinControl, AParams))  else    Result := TLCLIntfHandle(TCarbonWindow.Create(AWinControl, AParams));  frm:=TCustomForm(AWinControl);  if Assigned(frm) then  begin    if (AParams.WndParent<>0) and ((AParams.Style and WS_CHILD) = 0) then      SetWindowGroup(TCarbonWindow(Result).Window, GetWindowGroupOfClass(kHelpWindowClass));  end;end;   How do I change my code?  - on patches mean that I have to delete the line? ---------------------------------------------------------------------- Phil · 2016-07-28 12:39 Correct. Comment out or delete the last 6 lines starting with "frm:=...". ---------------------------------------------------------------------- xinyiman · 2016-11-02 15:06 Hello Phil, sorry if I reopen an old discussion, but the problem is very similar. I have the same problem with regard to all the times that I have to choose a file. For example when I have to load an image into a TImageList. It hangs around because the choice of the file is modal, but so is the screen from which it is invoked. Do you have any suggestions in this regard? Thank you