On Fri, Jun 14, 2019 at 9:16 AM Dmitry Boyarintsev <
[email protected]> wrote:

> There's one more thing about not overriding run method.
> The event loop needs to be "terminated" and/or "stopped" in order for run
> method to return.
> If it doesn't return, Pascal unit finalization section won't run, and
> that's not good.
>

A couple of things... I've modified the original patch changing
terminate(nil) to stop(nil).
That should take care of FPC friendly application termination.

I've also started on COCOALOOPNATIVE, Which seems to be as a safest (and
the most Cocoa friendly) approach.
As it does use native- run method, yet it doesn't hi-jack the loop to call
LCL event.
https://wiki.freepascal.org/Cocoa_Internals/Application#Native_Loop_.28COCOALOOPNATIVE.29

However, at this point, COCOALOOPHIJACK is used by default

thanks,
Dmitry
-- 
_______________________________________________
lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to