Re: Access violation for TWebBrowser: fixes didn't work at all
- From: "euthymos" <euthymos@xxxxxxxxx>
- Date: 18 Nov 2006 14:51:24 -0800
Hans-Peter Diettrich ha scritto:
euthymos wrote:
Debugging, I've found the line which raises the exception.
var
MyTextField, MySummaryField : string;
Document : IHTMLDocument2;
elem : IHTMLTextAreaElement;
Document := WebBrowser1.Document as IHTMLDocument2;
elem := Document.all.item('htmlbox', 0) as IHTMLTextAreaElement;
Insert an Nil check here, most probably elem is nil.
elem.value := MySummaryField; // <<< This line raises an
EAccessViolation exception with message 'Access violation at address
0066AA87 in module 'MySQLNewsManager.exe'. Read of address 00000000'.
DoDi
I think I've got it: it's a problem of asynchronousness. And it's very
hard to solve. Please help me: when I try to manipulate "elem",
Internet Explorer has not finished loading the page, so elem is nil.
How can I force TWebBrowser to behave in a synchronous way?
I tried to use the OnDocumentComplete to be sure the document is fully
loaded when interacting with it. But it didn't work.
.
- Follow-Ups:
- References:
- Access violation for TWebBrowser: fixes didn't work at all
- From: euthymos
- Re: Access violation for TWebBrowser: fixes didn't work at all
- From: euthymos
- Re: Access violation for TWebBrowser: fixes didn't work at all
- From: Hans-Peter Diettrich
- Access violation for TWebBrowser: fixes didn't work at all
- Prev by Date: Re: Delphi RLE bitmap Issue
- Next by Date: Re: Access violation for TWebBrowser: fixes didn't work at all
- Previous by thread: Re: Access violation for TWebBrowser: fixes didn't work at all
- Next by thread: Re: Access violation for TWebBrowser: fixes didn't work at all
- Index(es):
Relevant Pages
|