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


BISSELL 3-in-1 Turbo Lightweight Stick Vacuum, 2610 (Black) picture

BISSELL 3-in-1 Turbo Lightweight Stick Vacuum, 2610 (Black)

$36.06



BISSELL PowerForce Helix Turbo Pet Upright Vacuum 3332 picture

BISSELL PowerForce Helix Turbo Pet Upright Vacuum 3332

$54.00



Keystone ProForm .080

Keystone ProForm .080" SPLINT MATERIAL 5" X 5" 25/Pck Vacuum Forming Dental Lab

$35.00



VEVOR 9

VEVOR 9" Drywall Sander 850W Vacuum System Folding 6 Speed LED Strip Light

$99.43



Testo 552 Digital Vacuum Gauge with Micron Gauge Bluetooth and App Support picture

Testo 552 Digital Vacuum Gauge with Micron Gauge Bluetooth and App Support

$130.00



3 CFM Air Vacuum Pump HVAC Manifold Gauge Set AC A/C Refrigeration Kit picture

3 CFM Air Vacuum Pump HVAC Manifold Gauge Set AC A/C Refrigeration Kit

$46.00







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