Skip to main content



      Home
Home » Archived » EGL Development Tools » document.location gives nullpointerexception(Syntax wrong?)
document.location gives nullpointerexception [message #895609] Fri, 13 July 2012 15:06 Go to next message
Eclipse UserFriend
RichUI in EDT 0.8.0

This is probably trivial but I am just not able to figure it out. This code gives me a nullpointerexcpetion and I cannot figure out the syntax.

Anyone know what I am doing wrong?

	urlString string = document.location;
Re: document.location gives nullpointerexception [message #895613 is a reply to message #895609] Fri, 13 July 2012 15:39 Go to previous messageGo to next message
Eclipse UserFriend

It works for me in 0.8.1 M3. Preview mode, external browser, and deployed.

Maybe it's something that was fixed at some point between 0.8.0 and now.

--Dan
Re: document.location gives nullpointerexception [message #896030 is a reply to message #895609] Mon, 16 July 2012 22:06 Go to previous messageGo to next message
Eclipse UserFriend
Quote:

urlString string = document.location;


Nathan,

Did you put the sentence to the body of RUIHandler as instance variable? It does have problem in both 0.8 & 0.81 when you doing so, and a bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=385251 was opened for this.

But you could have following 2 work-around to avoid the problem,

1) Add self before document.location as following: urlString string = self.document.location;
2) Move the urlString string = document.location; to the function as local variable of function.

Hope it could help you.

Rocky
Re: document.location gives nullpointerexception [message #896124 is a reply to message #896030] Tue, 17 July 2012 06:54 Go to previous message
Eclipse UserFriend
Rocky:

I figured that out yesterday and moved it to the function. You are correct. That gets me around the problem.

Thx,

Nathan Reed
Previous Topic:Set compiler options in EGL New Package wizard
Next Topic:Bad install?
Goto Forum:
  


Current Time: Sun May 18 20:09:59 EDT 2025

Powered by FUDForum. Page generated in 0.02641 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top