BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-11-2008, 09:47 AM   #1 (permalink)
Talking BlackBerry Encyclopedia
 
arunk's Avatar
 
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 229
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question default input mode problem

Please Login to Remove!

I want an edit field, which accepts all chracters, digits everything... but the default input mode should be numeric...
Offline  
Old 08-11-2008, 10:40 AM   #2 (permalink)
New Member
 
Join Date: May 2008
Model: 8130
PIN: N/A
Carrier: Verizon
Posts: 13
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

You could try the TextFilter DEFAULT_SMART_PHONE - seems to come pretty close, with characters inputtable by Alt.

Otherwise, you could combine a key listener and injector. Have the listener take in the keystroke, then interpret it the way you want, and inject the desired KeyEvent.
Offline  
Old 08-11-2008, 11:12 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Insufficient Data For Meaningful Response

But seriously: You seem to be looking for a contradiction - an edit field that will accept anything, but by "default" it should accept only numbers. So my first question is: how do you propose to permit the user to change the input mode? My second question is: given that users are used to dealing with edit fields that accept the standard character inputs, why are you interested in violating their default understanding of how to enter data into an edit field?

If numeric characters are to be expected as the "default", that implies that your use of the information expects that - more often than not - numeric characters are the proper input information. Set the field to be numeric-only, and you're done. Why allow non-numeric? If you wish to permit all types of text entry, why restrict to numeric-only and then force users to jump through a set of hoops to enter something different?

The standard, typical edit field (allowing all types of character input) is something that every user understands as a result of using them in every other application. If your edit field only allows numeric input (but can be switched, somehow, to allow all input), the users will need to know how to switch the mode (requiring some documentation to be read, or requiring a note on the screen telling the user what to do). My guess is this: if the mode setting can be saved from one launch of the app to the next, the first time the user sets it to "allow all", they will never set it to anything else, even if the next time they use it they only want to enter numbers. Users will always find the quickest way to get their data-entry tasks done, and since they're already familiar (or should be ) with how to enter letters, numbers, and all the other characters using their device (full-keyboard or not), imposing a restriction on their input that can be changed if necessary seems (in my humble opinion!) to be a waste of coding and a waste of user time.

If your app is for you alone, or if this is an exercise to challenge your BlackBerry coding abilities, by all means, have at it. But if you're developing for a group of users (no matter how small), think about the constraint you're trying to impose and what that will mean for usability.

Cheers,

karl
__________________
Karl G. Kowalski
---------------
Owns a RAZR
Develops for BlackBerry
So next phone will be........an iPhone 3G!
Offline  
Old 08-12-2008, 12:24 AM   #4 (permalink)
Talking BlackBerry Encyclopedia
 
arunk's Avatar
 
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 229
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have an editField to input and display strings..

when the user enter the input it will be in text mode and pressing alt will allow numbers....

I want this field to accept both numbers and characters.. but by default input mode should be number and pressing alt should change it to characters mode
Offline  
Old 08-12-2008, 03:50 AM   #5 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

you could remove the editfield and add another one on the samle place using a keylistener on the alt-key.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 09-29-2008, 06:20 AM   #6 (permalink)
Talking BlackBerry Encyclopedia
 
arunk's Avatar
 
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 229
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question

I am not clear with the above mentioned methods. Can anyone help me by giving more information.

Actually I want all the characters to be entered in an Editfield.
But default mode should be numeric.

ie. I want to reverse the presence of ALT key.
Offline  
Old 10-01-2008, 12:17 AM   #7 (permalink)
Talking BlackBerry Encyclopedia
 
arunk's Avatar
 
Join Date: Mar 2008
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 229
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.