BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 04-17-2011, 07:50 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2009
Model: 8350i
PIN: N/A
Carrier: telus
Posts: 40
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Can't get focus away from custom field.

Please Login to Remove!

I have a custom field that used to extend Field and it worked fine. I changed it to extend BasicEditField so I could use a NumericFilter and now I can't focus away from it. That is once it gets focus I can't unfocus it by moving the trackball. I can unfocus with a touch device by touching another field but not with the trackball.
Offline  
Old 04-17-2011, 11:21 AM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2009
Model: 8350i
PIN: N/A
Carrier: telus
Posts: 40
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Can't get focus away from custom field.

Slowly but surely figuring this out on my own. The basiceditfield has a method called moveFocus which overrides the screen's regular focus handling. This is because a bef can have multiple lines of text to focus between I guess. So I've overriden the moveFocus method and now need to figure out how to set the screens focus manually. Ug, getting there.
Offline  
Old 04-17-2011, 01:35 PM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2009
Model: 8350i
PIN: N/A
Carrier: telus
Posts: 40
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Can't get focus away from custom field.

Pretty simple things take a long time to solve sometimes. The moveFocus method returns an integer. This returned integer represents the amount of scroll the method didn't use. Return a 1 or -1 to allow the screen to move focus away from this field. Only took me a half a day to figure this out. Hope I helped someone else.
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

Similar Threads for: Can't get focus away from custom field.
Thread Thread Starter Forum Replies Last Post
How to properly handle focus traversal in custom field niceonedave Developer Forum 0 04-20-2010 05:35 AM
set focus in manager's field abhiyenta Developer Forum 1 10-12-2009 10:27 AM
How to make the focus stay in my custom field yueren Developer Forum 1 07-23-2008 08:08 AM
Can't Sync Calendar to Outlook 2003 bpdunsta RIM Software 7 08-17-2007 10:10 PM
Custom Field creation lakshman Developer Forum 1 12-22-2005 09:18 AM





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