BlackBerryForums.com : Your Number One BlackBerry Community
     

»Sponsored Links


BlackBerryApps.com Best Sellers



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

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
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
Dougsg38p Offline
CrackBerry Addict
 
Posts: 801
Join Date: Mar 2008
Location: Austin, TX
Model: 8320
PIN: N/A
Carrier: T-Mobile
Default 10-27-2009, 11:10 PM

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.
   
Reply With Quote
Reply


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-2009 BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.