Welcome Guest Search | Active Topics | Sign In | Register

"Uncaught this is not eoapi object" Options
ns
Posted: Friday, April 29, 2016 12:45:33 PM
Rank: Member
Groups: Member

Joined: 8/11/2015
Posts: 17
eoWebBrowser and eoapi javascript objects ceased working with the version v16.0.68.0

Repro steps are:

1. Open TabbedBrowser example in the correct version.
2. Navigate to google.com in the TabbedBrowser.
3. Open console.
4. Type eoapi.getVersion()

Actual: Exception dialog is shown.
Expected: Version to be returned.

Please refer to the correct usage or provide a fix to the error, thank you.

Image attached:
eo_support
Posted: Friday, April 29, 2016 2:56:41 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Hi,

Please download the .70 build from our download page. We have just posted this build and it should fix this issue.

Thanks!
ns
Posted: Monday, May 2, 2016 9:01:45 AM
Rank: Member
Groups: Member

Joined: 8/11/2015
Posts: 17
Thanks, the issue is fixed in the new release.
eo_support
Posted: Monday, May 2, 2016 9:23:50 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Great. Thanks for confirming the fix!
roger reynolds
Posted: Saturday, May 14, 2016 1:43:43 PM
Rank: Advanced Member
Groups: Member

Joined: 3/11/2014
Posts: 57
I just upgraded to build 78 (from 55).
And i am getting this same error. I never tested .70, so i can't say whether it was fixed there and has regressed, or whether it was never fixed, or whether i'm hitting a similar result for a different reason.
Nonetheless, my code worked correctly in build .55 and is broken now.

It appears that the problem is when you call
eopdf.convert()

rather than

eoapi.convert();


If i use eoapi.convert it works.

Whether that is your intent, or whether it's a bug in the diagnostic message you added in .70 i don't know.
Either way, you need to fix that diagnostic message or update the documentation or both.

If this is the intent, then i think it's bad, because now my code has to be like this:

Code: JavaScript
if (eopdf) {
    eoapi.convert();
}


which just looks wrong. I have to test eopdf instead of eoapi, because eoapi is defined when using the form in your web browser control.
But i can't call eopdf.convert cuz it doesn't work.

Or, i can do it like this:

Code: JavaScript
if(eoapi && eoapi.convert) {
    eoapi.convert();
}


which works and looks a little more correct.
So long as eoapi.convert means PDF conversion. It probably should be called convertPdf, or even better, triggerManualPdfConversion.
But please don't change that now because you'll just break everybody again.


fwiw, i sure am tired of every time i take a build from you guys something breaks in a different way, it's either the web browser control or the pdf converter, and when i take a build to fix one, the other breaks. Do i sound frustrated. You bet.

Ever heard of QA?





eo_support
Posted: Saturday, May 14, 2016 4:14:47 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
roger reynolds wrote:

It appears that the problem is when you call
eopdf.convert()

rather than

eoapi.convert();


Hi,

I apologize for the problem. This is indeed still an issue in build .78 and it will be fixed in our next build. In the mean time, you can use eoapi instead. The recommended code is like this:

Code: JavaScript
if (eoapi)
    eoapi.convert();


The reason is we are phasing out "eopdf" in favor of "eoapi". So everything is moving to "eoapi" now. However for backwards compatability purpose, "eopdf" will continue to work for the foreseeable future. This is what broke in the .78 build.

Thanks!
roger reynolds
Posted: Saturday, May 14, 2016 5:19:42 PM
Rank: Advanced Member
Groups: Member

Joined: 3/11/2014
Posts: 57
Did you read my entire message?

The code you showed will try to call eoapi.convert() when the page runs in an EO web browser control that is not doing PDF creation, and it will blow up because eoapi.convert is not defined, even when eoapi is defined.

Maybe that isn't where you're headed, but that's where we are today.
eo_support
Posted: Saturday, May 14, 2016 5:32:12 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Hi,

Ah. Now I see what you meant. Yes, in that case you would use "if (eoapi & eoapi.convert)".

As we are merging EO.WebBrowser and EO.Pdf to use the same engine, we are merging the API interface as well, this is why eoapi was introduced. This does introduce the problem of where eoapi exists in both platform, but convert method only exists inside the HTML to PDF converter. I think checking both (eoapi and eoapi.convert) would be the most appropriate method (as you have pointed out we do need to update documentation on that). Please let us know if you have any other suggestions.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.