display TBuf8

Login to reply to this topic.
Thu, 2008-05-08 11:34
Joined: 2008-04-14
Forum posts: 9

Hello,

Back here with problem again.

I get some data from the serial port which i sent as 0x68 ( h )

However, when i read the buffer string that is defined in TBuf8 to compare with 0x68

Code is follows:

commPort.Read(readState,KSeconds,readBuffer);
...
for(TInt i=0; i {
if (readBuffer[i]==0x68)
{UpdateListBox(_L"get data i want");}
}

However, it never shows me "get data i want", so i want to display the readBuffer, after convert TBuf8 to TBuf, the listbox shows me square, strange.

Anyone knows how to display the TBuf8 on the screen correctly?


Thu, 2008-05-08 18:25
Joined: 2006-05-08
Forum posts: 150
Re: display TBuf8http://www3.symbian.com/faq.nsf/0/D5889EFF80ED8
Fri, 2008-05-09 07:30
Joined: 2005-04-13
Forum posts: 50
Re: display TBuf8

Little bit change may solve your problem as

if (readBuffer[i]==TChar(0x68))
{
UpdateListBox(_L"get data i want");
}

i.e. use Hex value in TChar wrapper


Jupitar

Fri, 2008-05-09 15:57
Joined: 2008-04-14
Forum posts: 9
Re: display TBuf8

Thanks for the reply, but still, it is not working. Any more ideas?

  • Login to reply to this topic.