BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 11-12-2008, 12:33 AM   #1
Klanjabrik
Knows Where the Search Button Is
 
Join Date: Nov 2008
Model: 8800
PIN: N/A
Carrier: simulator
Posts: 21
Default Listfield removeAllElements uncaught exception 14 >= 14

Please Login to Remove!

hi Guys,

i'm create ListField with dynamic data, and after i refresh the list, using removeAllElements, there is a warning "uncaught exception 14 >= 14", did i missed something ?
Offline  
Old 11-12-2008, 03:58 AM   #2
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

I cannot find "removeAllElements()" in the ListField API
__________________
Blessed is the end user who expects nothing, for he/she will not be disappointed. (Franklin's Rule)
Offline  
Old 11-13-2008, 11:56 PM   #3
Klanjabrik
Knows Where the Search Button Is
 
Join Date: Nov 2008
Model: 8800
PIN: N/A
Carrier: simulator
Posts: 21
Default

Thanks Ivanov,

What should i used to remove old data in listfield?
Offline  
Old 11-17-2008, 06:01 AM   #4
abhsax1978@hotmail.com
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Default

ListField.invalidate()
__________________
having new s for developers!!!
Offline  
Old 11-21-2008, 11:44 PM   #5
Klanjabrik
Knows Where the Search Button Is
 
Join Date: Nov 2008
Model: 8800
PIN: N/A
Carrier: simulator
Posts: 21
Default Vector listElements = new Vector();

actually, i'm using

public Vector listElements = new Vector();

to insert new item,

any solutions to remove all elemets in Vector?
Offline  
Old 11-24-2008, 03:58 AM   #6
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

Code:
    public void add(Object element) {
        _listElements.addElement(element);
        setSize(getSize());
    }

    public int getSize() {
        return (listElements != null) ? listElements.size() : 0;
    }
    
    public void remove(int index) {
        listElements.removeElementAt(index);
        setSize(getSize());
    }
    public void removeAll() {
        listElements.removeAllElements();
        setSize(0);
    }
__________________
Blessed is the end user who expects nothing, for he/she will not be disappointed. (Franklin's Rule)
Offline  
Old 11-25-2008, 02:54 AM   #7
Klanjabrik
Knows Where the Search Button Is
 
Join Date: Nov 2008
Model: 8800
PIN: N/A
Carrier: simulator
Posts: 21
Default

You're the best, Ivanov...

when i add setSize(0); the ListElements refreshed and filled with new list.

Thanks again...
Offline  
Old 01-31-2009, 02:51 AM   #8
taqi.mir
Thumbs Must Hurt
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: AT
Posts: 81
Default

Hi,

Do you know how to select particular row in the ,i tried setSelectedIndex method of ListField but it doesn't work,
Any idea to select the particular row.
Offline  
Old 02-02-2009, 04:13 AM   #9
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

setSelectedIndex works, but only if the listfield has the focus
__________________
Blessed is the end user who expects nothing, for he/she will not be disappointed. (Franklin's Rule)
Offline  
Closed Thread



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


NEW Mitsubishi A1SNMCA-8KE Memory Cassette picture

NEW Mitsubishi A1SNMCA-8KE Memory Cassette

$151.62



New Sealed AB 2080-MEMBAK-RTC Memory Backup, Data Log, Recipe ,High Accuracy RTC picture

New Sealed AB 2080-MEMBAK-RTC Memory Backup, Data Log, Recipe ,High Accuracy RTC

$281.95



New Sealed 6ES7 954-8LF03-0AA0 NEW SIEMENS 6ES7954-8LF03-0AA0 MEMORY CARD picture

New Sealed 6ES7 954-8LF03-0AA0 NEW SIEMENS 6ES7954-8LF03-0AA0 MEMORY CARD

$308.50



WiFi Audio Voice Recorder Audio Alerts Check Audio Real-Time 32GB USA Shipper picture

WiFi Audio Voice Recorder Audio Alerts Check Audio Real-Time 32GB USA Shipper

$129.00



Modicon Memory Card AS-ME85-000 picture

Modicon Memory Card AS-ME85-000

$225.00



1PC New ABB ACS880-MU-ZCU-12/14 ZMU-02 Inverter Memory Card 1year waranty picture

1PC New ABB ACS880-MU-ZCU-12/14 ZMU-02 Inverter Memory Card 1year waranty

$79.39







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