BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-27-2008, 11: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, 12:37 PM   #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





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