Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

We are doing IWidget_HandleEvent in EVT_POINTER_UP and EVT_POINTER_DOWN.
So when we touch text field, it launches virtual keypad. But we failed
to retrieve the text. We are doing IWidget_Gettextwidgettext in
EVT_APP_RESUME. But the text is not coming. This problem comes, when we remove widgets from root container and then recreate the screen.

We are drawing two text widgets. Now when we
touch on any text field, virtual input is coming. But When we PRESS
UP/DOWN/LEFT arrow keys in simulator, we can see the screen will redraw
once again. So for this we are doing this.

while(m_pWidgetRel = IXYContainer_GetFirstWidget(pMe->pXYContainer))
IXYContainer_Remove(pMe->pXYContainer, m_pWidgetRel);

while(m_pWidgetRel = IRootContainer_GetFirstWidget(pMe->picRoot))
IRootContainer_Remove(pMe->picRoot, m_pWidgetRel);

Because of this IrootContainer_Remove, the virtual input is not
coming from second time. We can reproduce this on SIMULATOR. Can u tell
me why it will not launch when we do this Remove?

Creating and releasing widgets repeatedly will cause memory
fragmentation. I don’t think by removing widgets from root container
will reduce the heap unless you release them.
If you are concerned about previous screen visibility on going to
next screen, you can control the visibility using
IRootContainer_SetPos() and redraw the root container (or part of it or
any widget in it) using IRootContainer_Invalidate().
 
Disable virtual input before removing widgets and enable it after removing.
IWidget_DisableVirtualInput().
This will solve the problem that not able to launch the virtual key pad after you remove the widgets.

Creating and releasing widgets repeatedly will cause memory
fragmentation. I don’t think by removing widgets from root container
will reduce the heap unless you release them.
If you are concerned about previous screen visibility on going to
next screen, you can control the visibility using
IRootContainer_SetPos() and redraw the root container (or part of it or
any widget in it) using IRootContainer_Invalidate().
 
Disable virtual input before removing widgets and enable it after removing.
IWidget_DisableVirtualInput().
This will solve the problem that not able to launch the virtual key pad after you remove the widgets.

As above said IWidget_HandleEvent in EVT_POINTER_UP and EVT_POINTER_DOWN.So when we touch text field, it launches virtual keypad. But we failed to retrieve the text. We are doing IWidget_Gettextwidgettext inEVT_APP_RESUME.
How can we do IWidget_Gettextwidgettext in EVT_APP_RESUME. This event triggers only when suspend event happens. In non touch screen phone AVK_SELECT can be used to retrive the text. For touch screen phones which eCode should be used?
So finally which event should be used to retrive the text? very much confused......
Please post some snippest...
 

As above said IWidget_HandleEvent in EVT_POINTER_UP and EVT_POINTER_DOWN.So when we touch text field, it launches virtual keypad. But we failed to retrieve the text. We are doing IWidget_Gettextwidgettext inEVT_APP_RESUME.
How can we do IWidget_Gettextwidgettext in EVT_APP_RESUME. This event triggers only when suspend event happens. In non touch screen phone AVK_SELECT can be used to retrive the text. For touch screen phones which eCode should be used?
So finally which event should be used to retrive the text? very much confused......
Please post some snippest...
 

Generally, we get text entered in text widgets/boxes when we are done with text entry screen and want to move to next screen or process text input on some event. Not sure why you want to do it on pointer up/down.
As you said in non-touch you are doing it on select key, similarly in touch phones you can have a button say "Done" which indicates that text entry has completed and user can press that to confirm the same. On done, you can get text from text widget.

Generally, we get text entered in text widgets/boxes when we are done with text entry screen and want to move to next screen or process text input on some event. Not sure why you want to do it on pointer up/down.
As you said in non-touch you are doing it on select key, similarly in touch phones you can have a button say "Done" which indicates that text entry has completed and user can press that to confirm the same. On done, you can get text from text widget.