BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 10-27-2009, 09:01 PM   #1 (permalink)
Thumbs Must Hurt
Join Date: Aug 2009
Model: Tour
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?


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

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.
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

CR MAGNETICS CR5410-50 TRANSDUCER pictureSiemens Sequoia Acuson 512 Cardiac Ultrasound w/ 4V1-PROBE- EV-8C4- Transducer.
Siemens Sequoia Acuson 512 Cardiac Ultrasound w/ 4V1-PROBE- EV-8C4- Transducer. picture3 Analog AD592AN Temperature Transducer Precision IC's
3 Analog AD592AN Temperature Transducer Precision IC's pictureISO-NS0064 Power Lynx Transducer
ISO-NS0064 Power Lynx Transducer pictureDATEX-OHMEDA FLOW TRANSDUCER SENSOR 1503-3855-000

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