Closed GoogleCodeExporter closed 9 years ago
One thing that I can test pretty consistently is that it takes some time for
the Browser field to become valid:
while Chromium1.Browser = nil do begin
Sleep(100);
Application.ProcessMessages;
end;
Besides that, there must be another internal race, because the MainForm field
sometimes never becomes valid:
while Chromium1.Browser.MainFrame = nil do begin
Sleep(100);
Application.ProcessMessages;
end;
//sometimes we never get here, but get stuck in the loop above
Chromium1.Browser.MainFrame.LoadUrl('file:///./test.html');
It appears to me that the slower it is to launch the program and load its
libraries, the more likely the problem is to exhibit itself.
Original comment by adar...@gmail.com
on 6 Feb 2011 at 12:43
The browser is multithreaded, you have to wait the onaftercreated event to have
a valid browser instance.
The first time use the DefaultUrl property.
Original comment by hgourv...@gmail.com
on 8 Feb 2011 at 8:41
Thanks :-) Works now. If you create an initial wiki page, I would be happy to
add some documentation about this.
Original comment by adar...@gmail.com
on 8 Feb 2011 at 7:05
Original issue reported on code.google.com by
adar...@gmail.com
on 5 Feb 2011 at 11:28