BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-27-2008, 10:35 AM   #1 (permalink)
New Member
 
digitalhuman's Avatar
 
Join Date: Jul 2007
Location: Netherlands
Model: 8110
OS: WinXP
PIN: 254E354B
Carrier: KPN
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Update RichTextField when application is running

Please Login to Remove!

He there,

Im very new to JDE so i hope you can help me out.

I have a class which reads data from an URL and returns string:

Like this:
Code:
textReader r = new textReader();
Dialog.alert(r.readData());
Now, wheh i press Start in mij ContextMenu i would like it to display the
r.readData() on the mainscreen in a RichTextField. But when i try to do
that i get an error like:

blocking on event dispatch thread

So the action below isn't working:

Code:
    private MenuItem _mGetData = new MenuItem("Ophalen",1,10){
        public void run()
        {
            rTextFiel.setText(r.readData());
        }
    };
Offline  
Old 10-27-2008, 11:37 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

sorround your code with invokelater or synchronize on the eventlog, see the developers guide for details
__________________
java developer, Devinto, hamburg/germany
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Apple Macintosh IIcx M5850 - Vintage
$23.91
Apple Macintosh IIcx M5850 - Vintage pictureApple Vintage Collection 399
$95000.0
Apple Vintage Collection 399 picture6fFT VOLEX APPLE 3 PRONG POWER CORD E62405Sp VINTAGE
$2.95
6fFT VOLEX APPLE 3 PRONG POWER CORD E62405Sp VINTAGE  pictureVintage Apple & Pear Fruit Firmness Tester
$28.0
Vintage Apple & Pear Fruit Firmness Tester  pictureUU1: Vintage Apple Powerbook Low Power AC Adapter ADP-17AB
$13.59
UU1: Vintage Apple Powerbook Low Power AC Adapter ADP-17AB picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.