OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: honkinberry on December 17, 2010, 11:12:52 AM

Title: Problem with WebBrowser control
Post by: honkinberry on December 17, 2010, 11:12:52 AM
I'm having an issue with a WebBrowser control.
I'm trying to close the dialog if the user clicks on certain links.  Also through Javascript.

In the attached example, everything works fine with the control in general.
But click the button, which sets a flag to close the form on the next browser navigation.
Then when clicking on any link, the form_close fires a Cx0000005 access violation.

I tried setting the Cancel parameter to true, but that error is even more grievous.

Thanks for any thoughts!

--J
Title: Re: Problem with WebBrowser control
Post by: owenwengerd on December 17, 2010, 08:07:25 PM
I've attached a version that returns Cancel set to True. That version doesn't crash on my computer.
Title: Re: Problem with WebBrowser control
Post by: honkinberry on December 19, 2010, 04:54:43 PM
That makes perfect sense, and it seems to work.  Many thanks.

So it would seem the moral of the story is that all ActiveX events should return a quoted list of the parameters?  Is it safe to return nil if no change is desired?

--J
Title: Re: Problem with WebBrowser control
Post by: owenwengerd on December 19, 2010, 05:24:55 PM
The return list should include only the parameters that are passed by reference, and it all depends on the control as to whether or not a NIL return is acceptable. I would guess that the vast majority of ActiveX events ignore any return value, but use the Control Browser to determine what, if anything, it expects.