FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour txbrowse/twbrowse support 2 bytes language word /char ?
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
txbrowse/twbrowse support 2 bytes language word /char ?
Posted: Tue Jul 10, 2007 03: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

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
txbrowse/twbrowse support 2 bytes language word /char ?
Posted: Thu Jul 12, 2007 02: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

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
txbrowse/twbrowse support 2 bytes language word /char ?
Posted: Thu Jul 12, 2007 05:00 PM

Shuming,

RE: keyboard buffer

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

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
txbrowse/twbrowse support 2 bytes language word /char ?
Posted: Fri Jul 13, 2007 01: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
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
txbrowse/twbrowse support 2 bytes language word /char ?
Posted: Fri Jul 13, 2007 02: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
txbrowse/twbrowse support 2 bytes language word /char ?
Posted: Fri Jul 13, 2007 07: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
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
txbrowse/twbrowse support 2 bytes language word /char ?
Posted: Fri Jul 13, 2007 08: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

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
txbrowse/twbrowse support 2 bytes language word /char ?
Posted: Fri Jul 13, 2007 01: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
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
txbrowse/twbrowse support 2 bytes language word /char ?
Posted: Sat Jul 14, 2007 01:29 AM

Ugo,
Mine's is fwh2.5 .
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651

Continue the discussion