BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 12-12-2007, 04:39 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default ObjectListField -> adding new Items

Please Login to Remove!

Hi, it'S me again

i added some items to my ObjectListField. After that i add the ObjectListField to the screen.

Now i've got an email listener. if a new email arrives i want to add the subject of the email to the ObjectListField, ok theres no problem to get the subject but nothing is added to the ObjectListField.

here some peaces of my source:
Code:
public class ActionsScreen extends MainScreen implements FolderListener {
public static ObjectListField myList = new ObjectListField();
//...
public void messagesAdded(FolderEvent e) {
//...
myList.insert(0,"New Message !!");
UiApplication.getUiApplication().invokeLater(new Runnable() {
            public void run() {                
                 myList.invalidate();
            }
          });
no errors in the application but no update of myList.

Can anybody help me again,please?

thanks =)

hibbert
__________________
My English is so bad, that makes me nobody so quickly after
Offline  
Old 12-13-2007, 03:52 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

The code that is executed by your folder listener is run in a different application context. If you use getUiApplication() you do not get your application but the one calling (folder app?).
Maybe you try to insert items using the menu or a button first to exclude any errors in your code there.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 12-13-2007, 04:14 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,
when i push the screen some items were added to the field.
If a new message arrives i get the subject and set it as parameter for the same function which adds the items by pushing the screen.

so the function is correct.

hibbert
__________________
My English is so bad, that makes me nobody so quickly after
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.