|
Rank: Member Groups: Member
Joined: 11/12/2015 Posts: 10
|
Hi. I am currently trying to use the engines but I found this problem:
Code: C#
Engine engine = Engine.Create("test");
This throws and exception: Object reference not set to an instance of an object. Some ideas about what's going on? Thanks in advance.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, This is a known issue. Please try to add the following code before Engine.Create:
Code: C#
WebView webView = new WebView();
Please let us know if this fixes the problem for you. This problem will be fixed in our next build so you will no longer need the above line by then. Thanks!
|
|
Rank: Member Groups: Member
Joined: 11/12/2015 Posts: 10
|
Thank you for the quick reply, it works :)
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Great. Glad to hear that it works! Please feel free to let us know if you have any more questions.
|
|
Rank: Member Groups: Member
Joined: 11/12/2015 Posts: 10
|
Hi again. I am trying with the last version and now I get this exception: Can not change engine when the WebView is already created.
Code: C#
Engine engine = Engine.Create(Guid.NewGuid().ToString());
_browser.Engine = engine;
How should I create the WebView? Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
This is normal. The "engine assignment" is used when the WebView is created, which usually occurs when your Form or Window's window handle being created. So you must move the code before that. If you use Windows Forms, you can try to do inside your constructor after InitializeComponent and see if it works.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 11/12/2015 Posts: 10
|
Thanks for the response.
|
|
Rank: Member Groups: Member
Joined: 11/12/2015 Posts: 10
|
Thanks again for the point, now is working like a charm.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Great. Thanks for confirming that it works!
|
|