Environment : Delphi 7, Windows 10 x64.
So my app is essentially based off SimpleBrowser2, but I get some odd errors with it, which seem to occur randomly. Whenever one of the errors occurs I also get an EOSError when quitting the application. (see screenshot)
For example I have a TCheckListBox, whcih I fill with links from the downloaded web page, My TCheckListBox has a popup menu assigned to it in it's PopupMenu property. Normally right clicking on the list brings up this menu, however it erratically fails to function, when it fails I always get the EOSError on exiting.
My dpr contains :
Code: Select all
program MiniWeb;
uses
Forms,
uCEFApplication,
CefInit,
MainFormUnit in 'MainFormUnit.pas' {BrowserForm},
other units cut for brevity......
{$R *.RES}
// CEF3/4 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes to use up to 3GB of RAM.
{$SetPEFlags $20}
begin
CreateGlobalCEFApp;
if GlobalCEFApp.StartMainProcess then
begin
Application.Initialize;
Application.CreateForm(TBrowserForm, BrowserForm);
Application.CreateForm(TSourceForm, SourceForm);
Application.CreateForm(TPreviewForm, PreviewForm);
Application.CreateForm(THelpForm, HelpForm);
Application.CreateForm(TAddRuleForm, AddRuleForm);
Application.CreateForm(TScriptEditor, ScriptEditor);
Application.Run;
END;
GlobalCEFApp.Free;
end.
Code: Select all
unit CefInit;
interface
USES uCEFApplication,Windows, Messages, SysUtils, Classes,MainFormUnit;
procedure CreateGlobalCEFApp;
implementation
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.EnablePrintPreview := True;
GlobalCEFApp.FrameworkDirPath := 'cef';
GlobalCEFApp.ResourcesDirPath := 'cef';
GlobalCEFApp.LocalesDirPath := 'cef\locales';
GlobalCEFApp.cache := 'cef\cache';
GlobalCEFApp.UserDataPath := 'cef\UserData';
end;
end.
Cheers.
Phill.