This will be a fixed thread with all the breaking changes in case you are upgrading from a very old CEF4Delphi version.
TChromium.OnClose parameters changed!!!
Date : Mar 28, 2019
The latest CEF4Delphi update fixes an issue cancelling the browser destruction sequence and I had to modify the parameters in the TChromium.OnClose and TFMXChromium.OnClose events.
Before the change, TOnClose was declared like this :
Code: Select all
TOnClose = procedure(Sender: TObject; const browser: ICefBrowser; out Result: Boolean) of object;
Code: Select all
TOnClose = procedure(Sender: TObject; const browser: ICefBrowser; var aAction : TCefCloseBrowserAction) of object;
TCefCloseBrowserAction is defined in uCEFTypes.pas like this :
Code: Select all
TCefCloseBrowserAction = (cbaClose, cbaDelay, cbaCancel);
- cbaCancel : stop closing the browser.
- cbaClose : continue closing the browser (THIS IS THE DEFAULT VALUE IN THE ONCLOSE EVENT). This is equivalent to setting "Result" to false with the previous event parameters.
- cbaDelay : stop closing the browser momentarily. Used when the application needs to execute some custom processes before closing the browser. This is usually needed to destroy a TCEFWindowParent in the main thread before closing the browser. This is equivalent to setting "Result" to true with the previous event parameters.
I'm sorry for the inconvenience.
![Embarrassed :oops:](./images/smilies/icon_redface.gif)