Closed GoogleCodeExporter closed 9 years ago
Can you provide some source code for this? You can use a site like pastebin or
pastie.org or attach it. Im not sure how to reproduce this exactly.
If the error only occurs from time to time it may be a timing/threading issue.
You should not modify a MT4j application from within a different thread as the
Animation Thread (like in a mousemotion listener).
Instead you can wrap the action into a invokeLater action to make it thread
safe calling it from another thread. The action will be exectuted the next
frame in the animation thread.
E.g.:
void mouseMoved(){
mtApplication.invokeLater(new Runnable(){ public void run(){ //do mt4j stuff
here} });
}
A similar method is described here:
http://www.mt4j.org/mediawiki/index.php/FAQ#How_to_avoid_threading_problems_.3F
Original comment by sirhc.f...@gmail.com
on 5 Jul 2010 at 1:41
Closing this since no answer and I couldnt reproduce it.
Original comment by sirhc.f...@gmail.com
on 11 Aug 2010 at 6:41
I had a similar problem with an MTTextArea. I was modifying the text off of
the animation thread. Just have to remember to modify components from other
threads using MTApplication.invokeLater(), the same way you have to modify
swing components using SwingUtilitities.invokeLater().
Original comment by drran...@gmail.com
on 3 Mar 2011 at 7:42
Original issue reported on code.google.com by
ajaenc...@gmail.com
on 5 Jul 2010 at 8:39