JSNI differences between hosted mode + production

54 views
Skip to first unread message

marklar

unread,
Apr 12, 2012, 9:06:31 AM4/12/12
to google-we...@googlegroups.com
Hi,

I'm running into an issue with JSNI that I was hoping someone could help me with. I am using an external JS file to generate QR codes and it works great when running from the development server in Eclipse. When I push it to my 'production' server, however, it fails to find the function I am trying to call. The JS file is loading correctly, it just can't refer to that function. The specific error I am getting is:

Uncaught ReferenceError: qrcode is not defined

I have double checked for typos. I've had trouble finding any documentation about this, any help would be very much appreciated.

Thanks,
Marklar

Alfredo Quiroga-Villamil

unread,
Apr 20, 2012, 10:06:19 AM4/20/12
to google-we...@googlegroups.com
Hi Marklar:

The first test I would do, to really validate "The JS file is loading correctly" is to go to the deployed instance and:d

- Fire up the browser.
- Open the console (firebug, chrome dev tools, etc..)
- Go to the console, attempt to find the function (JS) you are trying to get to from your GWT code and see if it is truly exported and accessible within the window scope.

Regards,

Alfredo

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/s6LWpQRCcdcJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
Alfredo Quiroga-Villamil

AOL/Yahoo/Gmail/MSN IM:  lawwton


Qian Qiao

unread,
Apr 20, 2012, 10:14:26 AM4/20/12
to google-we...@googlegroups.com

This is just a shot in the dark: in your JSNI, did you use $wnd.qrcode
or just qrcode?

I seemed to noticed a trend in the list of people asking questions
without providing the offending code snippets, it's very hard for the
rest of us to provide any meaningful help without seeing what the
actual code, or at least part of it.

-- Joe

Reply all
Reply to author
Forward
0 new messages