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

NEW ALLEN BRADLEY SLC 5/03 mfd. 2016 1747-L532 SER F 16 K PROCESSOR
$300.0
NEW ALLEN BRADLEY SLC 5/03 mfd. 2016 1747-L532 SER F 16 K PROCESSOR   pictureNIB Honeywell 620-0073C Ethernet Loop Processor Module Version 1.6
$1250.0
NIB Honeywell 620-0073C Ethernet Loop Processor Module Version 1.6 pictureSiemens 6ES5945-7UA13 6ES5 945-7UA13 SIMATIC S5-115U CPU 945 Processor
$495.0
Siemens 6ES5945-7UA13 6ES5 945-7UA13 SIMATIC S5-115U CPU 945 Processor picturePLC ALLEN BRADLEY 1768-L43 /B Processor/Controller Compactlogix
$750.0
PLC ALLEN BRADLEY 1768-L43 /B Processor/Controller Compactlogix picturePentax EPK-700 Video Endoscopy Processor
$2250.0
Pentax EPK-700 Video Endoscopy Processor picture






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