BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-27-2009, 10:01 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Aug 2009
Model: Tour
PIN: N/A
Carrier: Verizon
Posts: 84
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Menu Item: Bring up new screen based on focused field in VFM?

Please Login to Remove!

My mainscreen has a VerticalFieldManager. I've created a menu item on the mainscreen and when the user selects the menu item, I want the run method to show a new screen based on the INDEX number of the field from the mainscreen that had the focus before selecting the menu item.

But when I added mainscreen.getFieldWithFocusIndex() to my menu item's run method, it ALWAYS thinks that the FIRST item is in focus--no matter which one I have focused.

Any ideas?

TIA!
__________________
Don

Handspring Visor -> Handspring Visor Deluxe -> Palm Treo 650 on VZW -> Palm Treo 700p on VZW -> Blackberry Tour 9360 on VZW
Offline  
Old 10-27-2009, 11:10 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Using this method will give you only the Manager that has the focus. Remember that Manager inplements Field, so it looks like a field to the VerticalFieldManager that is the delgate for your MainScreen.

You can check the resposne from this call and see if it is indeed a Manager - if it is, then ask *it* for the field with focus.

Alternatively, you could use getLeafFieldWithFocus(), which will return the field which is *not* a manager.
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.