• Post Reply Bookmark Topic Watch Topic
  • New Topic

local variable unavailable  RSS feed

 
Janis Strautins
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I'm getting the following error from the eclipse debugger: local variable unavailable. Tried to trim the code as much as possible. The problem is pretty simple, I have to use the DivisiveUI UpdateLog() method, from the Divise class, using variables from the Cluster class. The Divise has a list containing all of the clusters. Divisive and DivisiveUI has a reference to each other. How can I get access to the variables: sumDistance, avgDistance from the Divisive class? Tried writing a method in the Divisive class, still couldn't access the needed variables :| Thank you!
Using Eclipse
Error crops at log.append(text+"\n"); Source Not Found.

Divisive:


DivisiveUI:


Cluster:



 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The safest thing would be to make the variables in those classes private and provide public accessor methods.
 
Janis Strautins
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, but still nothing - TextAttribute(AttributedCharacterIterator$Attribute).equals(Object) line: not available
 
Tony Docherty
Bartender
Posts: 3271
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm getting the following error from the eclipse debugger: local variable unavailable. Tried to trim the code as much as possible. The problem is pretty simple, I have to use the DivisiveUI UpdateLog() method, from the Divise class, using variables from the Cluster class. The Divise has a list containing all of the clusters. Divisive and DivisiveUI has a reference to each other. How can I get access to the variables: sumDistance, avgDistance from the Divisive class? Tried writing a method in the Divisive class, still couldn't access the needed variables :| Thank you!
Using Eclipse
Error crops at log.append(text+"\n"); Source Not Found.

I'm not sure I fully understand your problem but "source not found" errors from the Eclipse debugger occur when you try to step into a constructor/method of a class for which there is no attached source code.

Can you give more details on what you are actually doing and, if this is a run time issue, please include the full error message and stack trace.
 
Janis Strautins
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I really cant get my head around the problem. Got a feeling that i have shot myself in the leg. Any help would be greatly appreciated.

I even uploaded the whole eclipse project, including the libraries: http://dl.dropbox.com/u/103893376/Clusters.rar
Clustering selection is the main class. The problem is in Divisive class's last cycle, in which i call some methods, to calculate those two variables then print them in the UI using the UpdateLog() method inside of Divisive UI.
Choose the smallest xlsx file and run the Divisive with 2 clusters.

The complete stack looks like this:

Daemon Thread [SwingWorker-pool-2-thread-2] (Suspended)
owns: Hashtable<K,V> (id=79)
TextAttribute(Object).equals(Object) line: 150
TextAttribute(AttributedCharacterIterator$Attribute).equals(Object) line: not available
Hashtable<K,V>.get(Object) line: not available
PlainDocument(AbstractDocument).getProperty(Object) line: not available
PlainDocument(AbstractDocument).handleInsertString(int, String, AttributeSet) line: not available
PlainDocument(AbstractDocument).insertString(int, String, AttributeSet) line: not available
PlainDocument.insertString(int, String, AttributeSet) line: not available
JTextArea.append(String) line: not available
DivisiveUI.UpdateLog(String) line: 29
Divisive.Output() line: 140
Divisive.run() line: 34
Divisive.setClusterCount(int) line: 21
DivisiveUI$1$1.doInBackground() line: 94
DivisiveUI$1$1.doInBackground() line: 1
SwingWorker$1.call() line: not available
FutureTask$Sync.innerRun() line: not available
SwingWorker$2(FutureTask<V>).run() line: not available
DivisiveUI$1$1(SwingWorker<T,V>).run() line: not available
ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: not available
ThreadPoolExecutor$Worker.run() line: not available
Thread.run() line: not available
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!