View Full Version : using CLR button to go back...
ziman1
05-09-2002, 12:25 PM
Hello, I started programming BREW just a few weeks.
How can you use CLR button on the phone to go back to previous screen? Do you need to maintain a history list or something? I looked over all the example applications and it is very confusing.
Where does the application control that? More specifically, what variable?
I inserted statement "pme->m_nReturnState = S_PREVMENU" to the function Cal_PrevMenu and it didn't work.
Any suggestions?
Also, I want to add a SEARCH function to my application. I'm thinking user input a string and a "all possible .." screen returns. How do I implement that? I think I should use a sorted list first on the database and then use either binary search or quick sort. Any suggestions?
Thank you for all your help.
G. Rugal
05-14-2002, 01:41 PM
My problem is that using AVK_CLR works on the emulator but not on the actual phone. Anyone know what the right AVK is for the Sharp phone?
G. Rugal
05-15-2002, 09:38 PM
I also found that the clear button quits apps in general on the z800 so that might be an issue as well.
I have to say that I have the same problem.
I tried returning FALSE and TRUE from the event, trien bounce the evemt back by using ISHELL_SendEvent right after the EVT_KEY_PRESS to a EVT_USER but with no success.
This is a major problem since the soft key has a "Back" lable on it that is not eraseble. In this case the user can get confused!!!
Here's to you guys at Motorola...
Raghavendra
10-07-2003, 11:10 PM
Hey GUY !
The soft key labels are not editalbe from BREW, they are outside device screen info.
Accepted that it is confusing, but no way.
If you are returning FALSE on receipt of AVK_CLR then it quits the application.
- RR
mrfun
10-08-2003, 02:01 AM
Try handling it from EVT_KEY, rather than EVT_KEY_PRESS. It doesn't seem to respect the return value when handled from EVT_KEY_PRESS.
I've recently moved ALL key handling to EVT_KEY instead of EVT_KEY_PRESS, seemed to fix a 'slow response' issue with the A530 as well.
Thank's for the info.
I have changed the event from key press to key but I can't say there's a difference. I will use evt_key for now.
I understand that FALSE closes the application and I found some more issues in when using the iText object.
There is a small problem there.
When a user is entering text the CLR button uses to delete last char. When there are no chars in the text object and the user presses CLR the iText handler returns the same value as if the user pressed SELECT.
Personaly I have bypassed it to act as a "back" button something that the iText on the T720 dosn't have.
smarkwell
01-06-2004, 08:58 AM
As far as handling AVK_CLR. To prevent brew from sending the EVT_APP_STOP event, you need to handle ALL of the key's events.
EVT_KEY
EVT_KEY_HELD
EVT_KEY_PRESS
EVT_KEY_RELEASE
If your returning true on those when ever wParam is AVK_CLR then you'll only recieve the EVT_APP_STOP event, when the user holds down clear for a little bit.
vBulletin v3.0.13, Copyright ©2000-2009, Jelsoft Enterprises Ltd.