FAQ: Why does my ITextCtl/IMenuCtl not respond to user input? | developer.brewmp.com FAQ: Why does my ITextCtl/IMenuCtl not respond to user input? | developer.brewmp.com

Developer

FAQ: Why does my ITextCtl/IMenuCtl not respond to user input?

HI
I have generated dynamic menu. But EVT_COMMAND is not fired when I click on the menu Item I am able to navigate between the menu items. All the menu's are dynamically generated

Thanks

Pramod

You need to make sure you are passing key press events to you menu control via IMENUCTL_HandleEvent().

You need to make sure you are passing key press events to you menu control via IMENUCTL_HandleEvent().

hi everbdy I am Abhishek.
recently 1ly i started wrkin in BREW.Can Anybdy tell me how to scorl betwenn difeerent menuitems.
In my InitAPPdata i have added menu items 2 of them.
In handle event using EVT_KEY under say AVT_DOWN i am checking using GETSEL which item id is that ,then if it is 1 , using SETSEL i am changing to 2. After that break is there.but it's not wrkin.Do i need to use IMENUCTL_handleevent or ENABLECOMMAND.
Kindly tell me... for this. if i am missing some basic thing to be put down in my code.
rgds abhishek

hi everbdy I am Abhishek.
recently 1ly i started wrkin in BREW.Can Anybdy tell me how to scorl betwenn difeerent menuitems.
In my InitAPPdata i have added menu items 2 of them.
In handle event using EVT_KEY under say AVT_DOWN i am checking using GETSEL which item id is that ,then if it is 1 , using SETSEL i am changing to 2. After that break is there.but it's not wrkin.Do i need to use IMENUCTL_handleevent or ENABLECOMMAND.
Kindly tell me... for this. if i am missing some basic thing to be put down in my code.
rgds abhishek

YES! you really need to use IMENUCTL_HandleEvent for you to be able to change selected item..
reagards ;)

YES! you really need to use IMENUCTL_HandleEvent for you to be able to change selected item..
reagards ;)

hello orion just can u check my code: what's wrong with it.I am putting my code here... i have put question mark where i am finding difficulties:
/*===============================================================================
INCLUDES AND VARIABLE DEFINITIONS
=============================================================================== */
#include "AEEAppGen.h" // Applet helper file
#include "helloworld.bid" // Applet-specific header that contains class ID
#include "nmdef.h"
#include "Aeeimage.h"
#include "Aeemenu.h"
#include "Aeetext.h"
#include "Aeedate.h"
#include "AeeShell.h"
#include "AEEHtmlViewer.h"
#include "helloworld.brh"
//define the item id here one,two
#define ID_ONE 0
#define ID_TWO 1
typedef struct _CHelloWorld
{
AEEApplet a; // Mandatory first AEEApplet data member
IMenuCtl *m_pIMenu;
IShell * m_pIShell;
int started;
}CHelloWorld;
/*-------------------------------------------------------------------
Static function prototypes
-------------------------------------------------------------------*/
static boolean HelloWorld_HandleEvent(CHelloWorld * pme, AEEEvent eCode,uint16 wParam, uint32 dwParam);
static boolean app_InitAppData(CHelloWorld * pMe);
static boolean app_FreeAppData(CHelloWorld * pMe);
int AEEClsCreateInstance(AEECLSID ClsId,IShell * pIShell,IModule * pMod,void ** ppObj)
{
CHelloWorld *pMe = NULL;
*ppObj = NULL;
if(ClsId == 0x01009FF0)
{
if(AEEApplet_New( sizeof(CHelloWorld), // Size of our private class
ClsId, // Our class ID
pIShell, // Shell interface
pMod, // Module instance
(IApplet**)ppObj, // Return object
(AEEHANDLER)HelloWorld_HandleEvent, // Our event handler
NULL)==TRUE) // No special "cleanup" function
{
if(app_InitAppData((CHelloWorld *)* ppObj))
return(AEE_SUCCESS);
}
}
return (EFAILED);

/*this fn is being used for intialisation */
static boolean app_InitAppData(CHelloWorld * pMe)
{
AEERect rectMenu;
AECHAR szChoice[]={'s','e','l','e','c','t','\0'};
AECHAR szCut[] = {'C','u','t','\0'};
AECHAR szCopy[] = {'C','o','p','y','\0'};
ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_MENUCTL,(void **)&pMe->m_pIMenu);
rectMenu.x = 45;
rectMenu.y = 55;
rectMenu.dx = 55;
rectMenu.dy = 65;
IMENUCTL_SetRect(pMe->m_pIMenu,&rectMenu);
IMENUCTL_SetProperties(pMe->m_pIMenu,MP_UNDERLINE_TITLE);
IMENUCTL_SetTitle(pMe->m_pIMenu,NULL,0,szChoice);
IMENUCTL_AddItem(pMe->m_pIMenu,NULL,0,ID_ONE,szCut,0);
IMENUCTL_AddItem(pMe->m_pIMenu,NULL,1,ID_TWO,szCopy,0);
IMENUCTL_SetActive(pMe->m_pIMenu,FALSE);//is it needed??
//IMENUCTL_SetSel(pMe->m_pIMenu,ID_ONE);//as well as this??
IMENUCTL_Redraw(pMe->m_pIMenu);
IDISPLAY_Update(pMe->a.m_pIDisplay);
return TRUE;

static boolean HelloWorld_HandleEvent(CHelloWorld * pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam)
{
if (!pMe->started)
{
app_InitAppData(pMe);
}
IMENUCTL_SetActive(pMe->m_pIMenu,TRUE);
IMENUCTL_SetSel(pMe->m_pIMenu,ID_ONE);
switch (eCode){
case EVT_APP_START:
pMe->started = 1 ;
case EVT_KEY:
switch(wParam)
{
case AVK_DOWN:
/*IMENUCTL_HandleEvent(pMe->m_pIMenu,eCode,wParam,dwParam);
where this has to be put,if needed at all????*/
// IMENUCTL_EnableCommand(pMe->m_pIMenu,TRUE);//used in key SELECT??
if(ID_ONE==IMENUCTL_GetSel(pMe->m_pIMenu))
{
IMENUCTL_SetSel(pMe->m_pIMenu,ID_TWO);
break;
}
case AVK_UP:
if(ID_TWO==IMENUCTL_GetSel(pMe->m_pIMenu))
{
IMENUCTL_SetSel(pMe->m_pIMenu,ID_ONE);
break;
}
}
case EVT_APP_STOP:
app_FreeAppData(pMe);
return(TRUE);
}
return(FALSE);

static boolean app_FreeAppData(CHelloWorld * pMe)
{
if(pMe->m_pIMenu)
{
IMENUCTL_Release(pMe->m_pIMenu);
pMe->m_pIMenu = NULL;
}
return TRUE;

hello orion just can u check my code: what's wrong with it.I am putting my code here... i have put question mark where i am finding difficulties:
/*===============================================================================
INCLUDES AND VARIABLE DEFINITIONS
=============================================================================== */
#include "AEEAppGen.h" // Applet helper file
#include "helloworld.bid" // Applet-specific header that contains class ID
#include "nmdef.h"
#include "Aeeimage.h"
#include "Aeemenu.h"
#include "Aeetext.h"
#include "Aeedate.h"
#include "AeeShell.h"
#include "AEEHtmlViewer.h"
#include "helloworld.brh"
//define the item id here one,two
#define ID_ONE 0
#define ID_TWO 1
typedef struct _CHelloWorld
{
AEEApplet a; // Mandatory first AEEApplet data member
IMenuCtl *m_pIMenu;
IShell * m_pIShell;
int started;
}CHelloWorld;
/*-------------------------------------------------------------------
Static function prototypes
-------------------------------------------------------------------*/
static boolean HelloWorld_HandleEvent(CHelloWorld * pme, AEEEvent eCode,uint16 wParam, uint32 dwParam);
static boolean app_InitAppData(CHelloWorld * pMe);
static boolean app_FreeAppData(CHelloWorld * pMe);
int AEEClsCreateInstance(AEECLSID ClsId,IShell * pIShell,IModule * pMod,void ** ppObj)
{
CHelloWorld *pMe = NULL;
*ppObj = NULL;
if(ClsId == 0x01009FF0)
{
if(AEEApplet_New( sizeof(CHelloWorld), // Size of our private class
ClsId, // Our class ID
pIShell, // Shell interface
pMod, // Module instance
(IApplet**)ppObj, // Return object
(AEEHANDLER)HelloWorld_HandleEvent, // Our event handler
NULL)==TRUE) // No special "cleanup" function
{
if(app_InitAppData((CHelloWorld *)* ppObj))
return(AEE_SUCCESS);
}
}
return (EFAILED);

/*this fn is being used for intialisation */
static boolean app_InitAppData(CHelloWorld * pMe)
{
AEERect rectMenu;
AECHAR szChoice[]={'s','e','l','e','c','t','\0'};
AECHAR szCut[] = {'C','u','t','\0'};
AECHAR szCopy[] = {'C','o','p','y','\0'};
ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_MENUCTL,(void **)&pMe->m_pIMenu);
rectMenu.x = 45;
rectMenu.y = 55;
rectMenu.dx = 55;
rectMenu.dy = 65;
IMENUCTL_SetRect(pMe->m_pIMenu,&rectMenu);
IMENUCTL_SetProperties(pMe->m_pIMenu,MP_UNDERLINE_TITLE);
IMENUCTL_SetTitle(pMe->m_pIMenu,NULL,0,szChoice);
IMENUCTL_AddItem(pMe->m_pIMenu,NULL,0,ID_ONE,szCut,0);
IMENUCTL_AddItem(pMe->m_pIMenu,NULL,1,ID_TWO,szCopy,0);
IMENUCTL_SetActive(pMe->m_pIMenu,FALSE);//is it needed??
//IMENUCTL_SetSel(pMe->m_pIMenu,ID_ONE);//as well as this??
IMENUCTL_Redraw(pMe->m_pIMenu);
IDISPLAY_Update(pMe->a.m_pIDisplay);
return TRUE;

static boolean HelloWorld_HandleEvent(CHelloWorld * pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam)
{
if (!pMe->started)
{
app_InitAppData(pMe);
}
IMENUCTL_SetActive(pMe->m_pIMenu,TRUE);
IMENUCTL_SetSel(pMe->m_pIMenu,ID_ONE);
switch (eCode){
case EVT_APP_START:
pMe->started = 1 ;
case EVT_KEY:
switch(wParam)
{
case AVK_DOWN:
/*IMENUCTL_HandleEvent(pMe->m_pIMenu,eCode,wParam,dwParam);
where this has to be put,if needed at all????*/
// IMENUCTL_EnableCommand(pMe->m_pIMenu,TRUE);//used in key SELECT??
if(ID_ONE==IMENUCTL_GetSel(pMe->m_pIMenu))
{
IMENUCTL_SetSel(pMe->m_pIMenu,ID_TWO);
break;
}
case AVK_UP:
if(ID_TWO==IMENUCTL_GetSel(pMe->m_pIMenu))
{
IMENUCTL_SetSel(pMe->m_pIMenu,ID_ONE);
break;
}
}
case EVT_APP_STOP:
app_FreeAppData(pMe);
return(TRUE);
}
return(FALSE);

static boolean app_FreeAppData(CHelloWorld * pMe)
{
if(pMe->m_pIMenu)
{
IMENUCTL_Release(pMe->m_pIMenu);
pMe->m_pIMenu = NULL;
}
return TRUE;

try this code inside your Application HandleEvent before checking for returned eCode
if(IMENUCTL_HandleEvent(pApp->pIMenu,eCode,wParam,dwParam))
return TRUE;
good luck!

try this code inside your Application HandleEvent before checking for returned eCode
if(IMENUCTL_HandleEvent(pApp->pIMenu,eCode,wParam,dwParam))
return TRUE;
good luck!

I have a menu control in a dialog. I can detect and respond to the send key, but not the down key. I'm assuming this is because the menu control has taken control of the up/down/select keys. How can I make my app respond to the down key, but also allow the menu control to perform it's default action of selecting the next item in the list?

I have a menu control in a dialog. I can detect and respond to the send key, but not the down key. I'm assuming this is because the menu control has taken control of the up/down/select keys. How can I make my app respond to the down key, but also allow the menu control to perform it's default action of selecting the next item in the list?

Looks like you are returning TRUE from your app's event handler if that event is successfully handled by MenuCtl, like
if (IMENUCTL_HandleEvent(...))
return TRUE;
If this is what your code is like then you will not get a chance to handle UP / DOWN / SELECT. Just calling IMENUCTL_HandleEvent(..) and not returning TRUE will give you a chance to handle events.
- RR.

Looks like you are returning TRUE from your app's event handler if that event is successfully handled by MenuCtl, like
if (IMENUCTL_HandleEvent(...))
return TRUE;
If this is what your code is like then you will not get a chance to handle UP / DOWN / SELECT. Just calling IMENUCTL_HandleEvent(..) and not returning TRUE will give you a chance to handle events.
- RR.

My code never calls IMENUCTL_HandleEvent. The up and down functionality work without it on the emulator. I'm assuming it would work on a handset as well, is that wrong?
Do I need to call it in order to manually respond to the up and down keys? If so, can someone please provide a sample of what the code woud look like?
Thanks!

My code never calls IMENUCTL_HandleEvent. The up and down functionality work without it on the emulator. I'm assuming it would work on a handset as well, is that wrong?
Do I need to call it in order to manually respond to the up and down keys? If so, can someone please provide a sample of what the code woud look like?
Thanks!

Iam a novice to BREW and just trying to create itextctl and enter some data into that...iam calling itextctl_handleevent from evt_key...but when i call it iam getting some error...i could not enter the data into the itextctl...plz help me!!!!

Iam a novice to BREW and just trying to create itextctl and enter some data into that...iam calling itextctl_handleevent from evt_key...but when i call it iam getting some error...i could not enter the data into the itextctl...plz help me!!!!

Hi sekhs,
your problem description is not enough.. plz paste some text ctrl implementation code. What is your actual problem- text ctrl is not being drawn or the event handling is not working ???
Regards,
SoftEast :confused:

Hi sekhs,
your problem description is not enough.. plz paste some text ctrl implementation code. What is your actual problem- text ctrl is not being drawn or the event handling is not working ???
Regards,
SoftEast :confused:

i'm new to Brew tech...
i'm also face the same problem...I wont get the textcontrol in my Emulator...?
and also i want to know how to give events for the text control?
can any one give the links for example programs?
Thanx..

i'm new to Brew tech...
i'm also face the same problem...I wont get the textcontrol in my Emulator...?
and also i want to know how to give events for the text control?
can any one give the links for example programs?
Thanx..

@Deepa,
you can go thru these links,these might be of help to you...
http://brewforums.qualcomm.com/showthread.php?t=4980&highlight=itextctl
http://brewforums.qualcomm.com/showthread.php?t=217&highlight=itextctl
http://brewforums.qualcomm.com/showthread.php?t=14327&highlight=itextctl
you can search for ITextCtl in the forum,you will get more threads or posts...
@SoftEast
Thanks a lot for your reply...iam now comfortable with ITextCtl...sorry for the late reply...
regards,
Sekhs.

@Deepa,
you can go thru these links,these might be of help to you...
http://brewforums.qualcomm.com/showthread.php?t=4980&highlight=itextctl
http://brewforums.qualcomm.com/showthread.php?t=217&highlight=itextctl
http://brewforums.qualcomm.com/showthread.php?t=14327&highlight=itextctl
you can search for ITextCtl in the forum,you will get more threads or posts...
@SoftEast
Thanks a lot for your reply...iam now comfortable with ITextCtl...sorry for the late reply...
regards,
Sekhs.

am not able to enter text into text box
--------------------------------------------------------------------------------
{
AEERect rc;
AECHAR pszTitle[32]={'h','i','\0'};
AECHAR szBuf[25];
rc.x = 1;
rc.y = 1;
rc.dx = 80;
rc.dy = 60;
ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_TEXTCTL ,(void **)&pMe->p_txt);
// ITEXTCTL_SetTitle(pMe->p_txt,MITOCS_RES_FILE,1002,NULL);
ITEXTCTL_SetMaxSize(pMe->p_txt, 15);
ITEXTCTL_SetProperties(pMe->p_txt,TP_FRAME);
ITEXTCTL_SetRect(pMe->p_txt,&rc);
ITEXTCTL_SetInputMode(pMe->p_txt,AEE_TM_LETTERS);
ITEXTCTL_SetText(pMe->p_txt, L"", -1);
ITEXTCTL_SetActive(pMe->p_txt,TRUE);
ITEXTCTL_Redraw(pMe->p_txt);
IDISPLAY_Update (pMe->a.m_pIDisplay);
}
try this code
ashu

am not able to enter text into text box
--------------------------------------------------------------------------------
{
AEERect rc;
AECHAR pszTitle[32]={'h','i','\0'};
AECHAR szBuf[25];
rc.x = 1;
rc.y = 1;
rc.dx = 80;
rc.dy = 60;
ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_TEXTCTL ,(void **)&pMe->p_txt);
// ITEXTCTL_SetTitle(pMe->p_txt,MITOCS_RES_FILE,1002,NULL);
ITEXTCTL_SetMaxSize(pMe->p_txt, 15);
ITEXTCTL_SetProperties(pMe->p_txt,TP_FRAME);
ITEXTCTL_SetRect(pMe->p_txt,&rc);
ITEXTCTL_SetInputMode(pMe->p_txt,AEE_TM_LETTERS);
ITEXTCTL_SetText(pMe->p_txt, L"", -1);
ITEXTCTL_SetActive(pMe->p_txt,TRUE);
ITEXTCTL_Redraw(pMe->p_txt);
IDISPLAY_Update (pMe->a.m_pIDisplay);
}
try this code
ashu

Read the API ref. Quote:While the text control is active, your application must send all keypress events to it by calling ITEXTCTL_HandleEvent().

Read the API ref. Quote:While the text control is active, your application must send all keypress events to it by calling ITEXTCTL_HandleEvent().

can anyone help me by looking at below code wats wrong in it
AEERect m_textRect;
ISHELL_CreateInstance(pApp->a.m_pIShell, AEECLSID_TEXTCTL, (void**)(&pApp->m_pText));
SETAEERECT(&m_textRect, 0, 20, 130, 125);
ITEXTCTL_SetRect(pApp->m_pText,&m_textRect );
ITEXTCTL_SetTitle(pApp->m_pText,HELLOWORLD_RES_FILE,1008,NULL);
ITEXTCTL_SetProperties( pApp->m_pText, TP_FRAME );
ITEXTCTL_SetInputMode( pApp->m_pText, AEE_TM_LETTERS );
ITEXTCTL_SetActive(pApp->m_pText, TRUE);

can anyone help me by looking at below code wats wrong in it
AEERect m_textRect;
ISHELL_CreateInstance(pApp->a.m_pIShell, AEECLSID_TEXTCTL, (void**)(&pApp->m_pText));
SETAEERECT(&m_textRect, 0, 20, 130, 125);
ITEXTCTL_SetRect(pApp->m_pText,&m_textRect );
ITEXTCTL_SetTitle(pApp->m_pText,HELLOWORLD_RES_FILE,1008,NULL);
ITEXTCTL_SetProperties( pApp->m_pText, TP_FRAME );
ITEXTCTL_SetInputMode( pApp->m_pText, AEE_TM_LETTERS );
ITEXTCTL_SetActive(pApp->m_pText, TRUE);

did u call ITEXTCTL_HandleEvent() in ur application handle event routine?
-Namaz

did u call ITEXTCTL_HandleEvent() in ur application handle event routine?
-Namaz

namaz79 wrote:did u call ITEXTCTL_HandleEvent() in ur application handle event routine?
-Namaz
i called in main handle event function before all cases but its not working,
its not even going into application if i call this way,error coming
boolean RF_HandleEvent(mitocApp * pApp, AEEEvent eCode, uint16 wParam, uint32 dwParam )
{
if (ITEXTCTL_HandleEvent(pApp->m_pText, eCode, wParam, dwParam))
return TRUE;

namaz79 wrote:did u call ITEXTCTL_HandleEvent() in ur application handle event routine?
-Namaz
i called in main handle event function before all cases but its not working,
its not even going into application if i call this way,error coming
boolean RF_HandleEvent(mitocApp * pApp, AEEEvent eCode, uint16 wParam, uint32 dwParam )
{
if (ITEXTCTL_HandleEvent(pApp->m_pText, eCode, wParam, dwParam))
return TRUE;

Send EVT_KEY events, not everything. With that code, you'll send EVT_APP_START to the TextCtl, it will return false (since the text control doesn't handle that event), and your app won't start properly.

Send EVT_KEY events, not everything. With that code, you'll send EVT_APP_START to the TextCtl, it will return false (since the text control doesn't handle that event), and your app won't start properly.

mk.manju wrote:i called in main handle event function before all cases but its not working,
its not even going into application if i call this way,error coming
boolean RF_HandleEvent(mitocApp * pApp, AEEEvent eCode, uint16 wParam, uint32 dwParam )
{
if (ITEXTCTL_HandleEvent(pApp->m_pText, eCode, wParam, dwParam))
return TRUE;

fine im able to create dat textbox and enter data,
how can i encode da text before printing it on screen(for eg in password text box
*********) hw can i change text to this kind

mk.manju wrote:i called in main handle event function before all cases but its not working,
its not even going into application if i call this way,error coming
boolean RF_HandleEvent(mitocApp * pApp, AEEEvent eCode, uint16 wParam, uint32 dwParam )
{
if (ITEXTCTL_HandleEvent(pApp->m_pText, eCode, wParam, dwParam))
return TRUE;

fine im able to create dat textbox and enter data,
how can i encode da text before printing it on screen(for eg in password text box
*********) hw can i change text to this kind

thanks it really worked

thanks it really worked

TP_PASSWORD. Check the API ref.

TP_PASSWORD. Check the API ref.

mohlendo wrote:TP_PASSWORD. Check the API ref.
Data read from textbox into
buffer fully im nt able to append it to another string.........
only one charecter of it is appending da below code am using sme one can help wats wrong in it
boolean Socket_WriteMove(mitocs * pApp)
{
int nRet;
char pBuffer[10];//buffer im using to read data from text box
char pBuffer1[10];
unsigned char temp[500] = {0};
unsigned char cmd3[] = "<?xml version=1.0 encoding=UTF-8 ?>";
unsigned char cmd4[] = "http://etherx.jabber.org/streams'>";
unsigned char cmd1[]= "";
unsigned char cmd2[]="neos";
unsigned char cmd8[]="";
STRCAT(cmd3,cmd4);
ITEXTCTL_GetText
(
pApp->p_txt1,//text box1 for reading username
pBuffer,
10
);
ITEXTCTL_GetText
(
pApp->p_txt2,//textbox2 for redaing password
pBuffer1,
10
);
//i printed and wrote pbuffers to file aswell as screen da whole entered data am able to see in file and screen
STRCAT(cmd1,pBuffer);//appending buffer which contains username taken from textbox
STRCAT(cmd1,cmd2);
STRCAT(cmd1,pBuffer1);//appending password
STRCAT(cmd1,cmd8);
// but when i printed and wrote cmd1 to fileonly one charecter of username as well as password is appended to da string.
pApp->nNetstate = NETSTATE_WRITE;
if (!pApp->pISocket)
return TRUE;
//Cancel callback and write data to server
ISOCKET_Writeable(pApp->pISocket, NULL, NULL);
switch(choice)
{
case connects:
nRet = ISOCKET_Write(pApp->pISocket, cmd3, sizeof(char)*400);
Socket_ReadMove(pApp);
return TRUE;
case regi:
nRet = ISOCKET_Write(pApp->pISocket,cmd1, sizeof(char)*400);
Socket_ReadMove(pApp);
return TRUE;
return TRUE;
}
//Cancel callback and write data to server
if (nRet == AEE_NET_ERROR)
{
int nErr = ISOCKET_GetLastError(pApp->pISocket);
int nErr2 = INETMGR_GetLastError(pApp->pINetMgr);
ISHELL_CloseApplet(pApp-> a.m_pIShell, FALSE);
return FALSE;
}
//We are not done sending bytes
if (nRet == AEE_NET_WOULDBLOCK)
{
//If this call blocks, assign callback
ISOCKET_Writeable(pApp->pISocket, Socket_WriteCallBack, (void*)pApp);
}
else
{
pApp->nNetstate = NETSTATE_OK;
//Socket_ReadMove(pApp);
return TRUE;
}
return FAL

mohlendo wrote:TP_PASSWORD. Check the API ref.
Data read from textbox into
buffer fully im nt able to append it to another string.........
only one charecter of it is appending da below code am using sme one can help wats wrong in it
boolean Socket_WriteMove(mitocs * pApp)
{
int nRet;
char pBuffer[10];//buffer im using to read data from text box
char pBuffer1[10];
unsigned char temp[500] = {0};
unsigned char cmd3[] = "<?xml version=1.0 encoding=UTF-8 ?>";
unsigned char cmd4[] = "http://etherx.jabber.org/streams'>";
unsigned char cmd1[]= "";
unsigned char cmd2[]="neos";
unsigned char cmd8[]="";
STRCAT(cmd3,cmd4);
ITEXTCTL_GetText
(
pApp->p_txt1,//text box1 for reading username
pBuffer,
10
);
ITEXTCTL_GetText
(
pApp->p_txt2,//textbox2 for redaing password
pBuffer1,
10
);
//i printed and wrote pbuffers to file aswell as screen da whole entered data am able to see in file and screen
STRCAT(cmd1,pBuffer);//appending buffer which contains username taken from textbox
STRCAT(cmd1,cmd2);
STRCAT(cmd1,pBuffer1);//appending password
STRCAT(cmd1,cmd8);
// but when i printed and wrote cmd1 to fileonly one charecter of username as well as password is appended to da string.
pApp->nNetstate = NETSTATE_WRITE;
if (!pApp->pISocket)
return TRUE;
//Cancel callback and write data to server
ISOCKET_Writeable(pApp->pISocket, NULL, NULL);
switch(choice)
{
case connects:
nRet = ISOCKET_Write(pApp->pISocket, cmd3, sizeof(char)*400);
Socket_ReadMove(pApp);
return TRUE;
case regi:
nRet = ISOCKET_Write(pApp->pISocket,cmd1, sizeof(char)*400);
Socket_ReadMove(pApp);
return TRUE;
return TRUE;
}
//Cancel callback and write data to server
if (nRet == AEE_NET_ERROR)
{
int nErr = ISOCKET_GetLastError(pApp->pISocket);
int nErr2 = INETMGR_GetLastError(pApp->pINetMgr);
ISHELL_CloseApplet(pApp-> a.m_pIShell, FALSE);
return FALSE;
}
//We are not done sending bytes
if (nRet == AEE_NET_WOULDBLOCK)
{
//If this call blocks, assign callback
ISOCKET_Writeable(pApp->pISocket, Socket_WriteCallBack, (void*)pApp);
}
else
{
pApp->nNetstate = NETSTATE_OK;
//Socket_ReadMove(pApp);
return TRUE;
}
return FAL

Hi,
I have a TextCtl where I want to edit text. I got the text box to show up, but nothing happens after I press any number keys (text input is not working). Any suggestion?
rect = mvip_getCordinants(pApp,PIN_INSTRUCTION_TITLE);
ITEXTCTL_SetProperties(pApp->m_pITextCtl, ST_CENTERTEXT);
ITEXTCTL_SetRect(pApp->m_pITextCtl, &rect);
ITEXTCTL_SetTitle(pApp->m_pITextCtl, MVIP_RES_FILE, IDS_ACTITLE, NULL);
ITEXTCTL_SetInputMode(pApp->m_pITextCtl,AEE_TM_NUMBERS);
ITEXTCTL_GetText(pApp->m_pITextCtl, aeBuf, 7);
ITEXTCTL_Redraw(pApp->m_pITextCtl);
ITEXTCTL_SetActive(pApp->m_pITextCtl, TRUE);
IDISPLAY_Update(pApp->m_Applet.m_pIDisplay);

Hi,
I have a TextCtl where I want to edit text. I got the text box to show up, but nothing happens after I press any number keys (text input is not working). Any suggestion?
rect = mvip_getCordinants(pApp,PIN_INSTRUCTION_TITLE);
ITEXTCTL_SetProperties(pApp->m_pITextCtl, ST_CENTERTEXT);
ITEXTCTL_SetRect(pApp->m_pITextCtl, &rect);
ITEXTCTL_SetTitle(pApp->m_pITextCtl, MVIP_RES_FILE, IDS_ACTITLE, NULL);
ITEXTCTL_SetInputMode(pApp->m_pITextCtl,AEE_TM_NUMBERS);
ITEXTCTL_GetText(pApp->m_pITextCtl, aeBuf, 7);
ITEXTCTL_Redraw(pApp->m_pITextCtl);
ITEXTCTL_SetActive(pApp->m_pITextCtl, TRUE);
IDISPLAY_Update(pApp->m_Applet.m_pIDisplay);

Hi,
I have a TextCtl where I want to edit text. I got the text box to show up, but nothing happens after I press any number keys (text input is not working). Any suggestion?
rect = mvip_getCordinants(pApp,PIN_INSTRUCTION_TITLE);
ITEXTCTL_SetProperties(pApp->m_pITextCtl, ST_CENTERTEXT);
ITEXTCTL_SetRect(pApp->m_pITextCtl, &rect);
ITEXTCTL_SetTitle(pApp->m_pITextCtl, MVIP_RES_FILE, IDS_ACTITLE, NULL);
ITEXTCTL_SetInputMode(pApp->m_pITextCtl,AEE_TM_NUMBERS);
ITEXTCTL_GetText(pApp->m_pITextCtl, aeBuf, 7);
ITEXTCTL_Redraw(pApp->m_pITextCtl);
ITEXTCTL_SetActive(pApp->m_pITextCtl, TRUE);
IDISPLAY_Update(pApp->m_Applet.m_pIDisplay);

Hi,
I have a TextCtl where I want to edit text. I got the text box to show up, but nothing happens after I press any number keys (text input is not working). Any suggestion?
rect = mvip_getCordinants(pApp,PIN_INSTRUCTION_TITLE);
ITEXTCTL_SetProperties(pApp->m_pITextCtl, ST_CENTERTEXT);
ITEXTCTL_SetRect(pApp->m_pITextCtl, &rect);
ITEXTCTL_SetTitle(pApp->m_pITextCtl, MVIP_RES_FILE, IDS_ACTITLE, NULL);
ITEXTCTL_SetInputMode(pApp->m_pITextCtl,AEE_TM_NUMBERS);
ITEXTCTL_GetText(pApp->m_pITextCtl, aeBuf, 7);
ITEXTCTL_Redraw(pApp->m_pITextCtl);
ITEXTCTL_SetActive(pApp->m_pITextCtl, TRUE);
IDISPLAY_Update(pApp->m_Applet.m_pIDisplay);

Are you passing key events to the ITextCtl with ITEXTCTL_HandleEvent()?

Are you passing key events to the ITextCtl with ITEXTCTL_HandleEvent()?

use ITEXTCtl_Handle Event in your code at EVT_KEY

use ITEXTCtl_Handle Event in your code at EVT_KEY