txbrowse/twbrowse support 2 bytes language word /char ?

txbrowse/twbrowse support 2 bytes language word /char ?

Postby ShumingWang » Tue Jul 10, 2007 3:09 am

Hi,
How could xbrowse/twbrowse suport 2 bytes language word as 1 char ?
I know lfastedit:=.t., method keychar() can transmit a 1 byte char as 0-9,a-Z into tget . How could transmit 2 bytes word input into tget?

Thanks !
Shuming Wang
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Postby ShumingWang » Thu Jul 12, 2007 2:49 am

On DOS,we can use :

while nextkey()>0
cstr+=char(nextkey())
inkey()
end

keyboard cstr

To get the keyboard buffer, and transport into current oget.

Now, on windows , nextkey() not work.

Is there any function to get the keyboard buffer ?

http://docs.mandragor.org/files/Common_ ... ex006.html

Might offer a way.

Thanks !

Shuming Wang
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Postby James Bott » Thu Jul 12, 2007 5:00 pm

Shuming,

RE: keyboard buffer

There are lots of answers to your question. What exactly are you trying to do?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby ShumingWang » Fri Jul 13, 2007 1:49 am

James
I want xbrowse/wbrowse/txbrowse edit as excel and support Chinese 2 bytes word.
browse--keychar()--col:edit()
For example:
browse as
name descrip tel
Bob computer 920888888
张三 程序员 023999999
李四 系统分析师 139999999


When browse cursor at row 2,col3 , and type 9, then browse call keychar() method ,then call oCol:Edit( nKey ) and create tget and the pre typed chr(9) will become the first char on the get as 9
when browser cursor at row 2 ,col2, and type Chinese words 程序员,then oget should display 程序员,but oCol:Edit( nKey ) only transport the first char, a Chinse word contianed 2 bytes, sometimes many bytes.
If we can get the keyboard buffer and do a keybord command , then transport all the words into the oget .

Regards !
Shuming Wang
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Postby James Bott » Fri Jul 13, 2007 2:01 am

Shuming,

>If we can get the keyboard buffer and do a keybord command , then transport all the words into the oget .

I am guessing that it is a whole lot more complicated than that.

I have no experience with Chinese (or any language other than English) so I can't offer much help. There is a data, nLastKey, that contains the last keystroke typed, but I don't know if that will help. nLastkey is part of the TWindow class so all controls inherit it.

I don't quite understand when you say a Chinese word 3 characters long is entered, but only the first character ends up in the Get. Do you mean that three keystrokes are used to create this word, or?

Perhaps someone with other language experience can help.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Ugo » Fri Jul 13, 2007 7:59 am

James Bott wrote:I don't quite understand when you say a Chinese word 3 characters long is entered, but only the first character ends up in the Get. Do you mean that three keystrokes are used to create this word, or?

James,
I have the same problem!
see:
http://fivetechsoft.com/forums/viewtopi ... 8186#28186
do you remember?

Shuming,
can you test the sample and report here?
Is the same problem?

Sorry for my bad english!
Ciao, best regards,
Ugo
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby ShumingWang » Fri Jul 13, 2007 8:47 am

Ugo,James,
Yes! the click, copy,paste,Ctrl+V of tget now works well.
Chinse input might be some words at the same time , can take as some chars at the same time .
Thanks!
Shuming Wang
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Postby Ugo » Fri Jul 13, 2007 1:18 pm

ShumingWang wrote:Yes! the click, copy,paste,Ctrl+V of tget now works well.


Shuming,
have you tested my sample?
You can find the sample at
http://fivetechsoft.com/forums/viewtopi ... 51&start=0
I Tested now and do not work!!
I can see the special characters after Ctrl+V but when exit from the control the char change in "?"
in the case of use the clipboard the paste button, insert directly the "?" char(s).

Now I use FWHX 7.04, xHarbour 0.99.71 from CVS and Vista Business.

The new version of FWH change this situation?
Ciao, best regards,
Ugo
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby ShumingWang » Sat Jul 14, 2007 1:29 am

Ugo,
Mine's is fwh2.5 .
Shuming Wang
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 62 guests