BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-31-2008, 09:29 PM   #1 (permalink)
New Member
 
Join Date: Jul 2008
Model: 8700c
PIN: N/A
Carrier: Cingular
Posts: 6
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default ListField - selectedIndexChange event

Please Login to Remove!

Is there such a thing? So far the only way I can figure to be notified when the selected index of a ListField changes is through the drawListRow.

I've search everywhere but can't seem to find any examples of a callback for that purpose.

Thanks for any help
-Steve
Offline  
Old 07-31-2008, 10:53 PM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Dec 2005
Model: 8310
Carrier: Rogers
Posts: 138
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can override moveFocus. Check the selected item before the call to super then the selected item after. If different, you've got it. Additionally you could just override moveFocus with the x and y arguments and use those to determine your movement but I've found it unreliable in some circumstances.
Offline  
Old 07-31-2008, 11:01 PM   #3 (permalink)
New Member
 
Join Date: Jul 2008
Model: 8700c
PIN: N/A
Carrier: Cingular
Posts: 6
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Funny you should mention a workaround, I did this in the drawListRow and it seems to work.
Code:
// Until I find a better way, this is how I get a single listchange event.
            iValue = list.getSelectedIndex();
            if(iValue != iSelIndex)
            {
                iSelIndex=iValue;
                cfm.ChangeContent(menu[iSelIndex]);
            }
I'll have to try it in moveFocus as I'm guessing it doesn't get called as much as drawListRow.

Thanks
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

(1PCS) BUL1102E TRANS NPN 450V 4A TO-220 1102 BUL1102
$1.94
(1PCS) BUL1102E TRANS NPN 450V 4A TO-220 1102 BUL1102 picture(1PCS) STP3NK60ZFP MOSFET N-CH 600V 2.4A TO-220FP 3NK60 STP3NK60
$2.24
(1PCS) STP3NK60ZFP MOSFET N-CH 600V 2.4A TO-220FP 3NK60 STP3NK60 picture4Pcs Sn74hc00n 74Hc00n Quad 2-Input 14-Dip Nand Gate Ic New S
$0.99
4Pcs Sn74hc00n 74Hc00n Quad 2-Input 14-Dip Nand Gate Ic New S picture2Pcs Dip Cpu Pic16c54c 04/P Pic16c54c-04/P 16C54 Ic New L
$1.72
2Pcs Dip Cpu Pic16c54c 04/P Pic16c54c-04/P 16C54 Ic New L picture1Pcs Irf1045 Irf1405pbf To-220 Mosfet N-Ch 55V 169A New Ic T
$1.13
1Pcs Irf1045 Irf1405pbf To-220 Mosfet N-Ch 55V 169A New Ic T picture






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