Get control and polish nation characters

Get control and polish nation characters

Postby pawelu » Thu Jul 20, 2006 2:28 pm

Antonio,

I create simple test function with 2 control: get an multiget eg:

Code: Select all  Expand view  RUN
Function TestPlc ()

   Local oWnd := Nil
   Local oTest1 := Nil
   Local cTest1 := Space (30)
   Local oTest2 := Nil
   Local cTest2 := Space (30)

   Define Window oWnd Title 'Nation characters'
   @ 50, 5 Get oTest1 Var cTest1 Size 200, 20 Pixel On Change MsgInfo ('Ok')
   @ 80, 5 Get oTest1 Var cTest1 Size 200, 20 Pixel Multiline On Change MsgInfo ('Ok')
   Activate Window oWnd

Return .T.


When I type in standard get field polish nation character eg. Ą (ASCII code 165) get buffer still empty and message no show. Next, when I put normal letter, this remove first. This is for all polish nation characters without Ó (ASCII code - 211). In multiline get control all polish letters works OK - buffer is change when I type normal and nation letters.

Regards
Pawel
pawelu
 
Posts: 126
Joined: Thu Oct 06, 2005 10:18 pm
Location: Poland

Postby Antonio Linares » Thu Jul 20, 2006 4:48 pm

Pawel,

You have to use this code but with your country initials:

REQUEST HB_LANG_ES
REQUEST HB_CODEPAGE_ESWIN
HB_LangSelect('ES')
HB_SetCodePage("ESWIN")
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42112
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby pawelu » Fri Jul 21, 2006 6:21 am

Antonio,

I test with and without initial language settings:

Code: Select all  Expand view  RUN
   Request Hb_Lang_PLWIN
   Request Hb_CodePage_PLWIN
   Hb_LangSelect ('PL')
   Hb_SetCodePage ('PLWIN')


Nothing is change.

Regards
Pawel
pawelu
 
Posts: 126
Joined: Thu Oct 06, 2005 10:18 pm
Location: Poland

Postby Antonio Linares » Fri Jul 21, 2006 6:48 am

Pawel,

We may need to review how ASCII code 165 is managed in Class TGet.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42112
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby pawelu » Sun Jul 23, 2006 9:39 am

Antonio,

I check key codes send to get control from Marchevka software keyboard . It's look like this:

Ą - 260 ą - 261
Ć - 262 ć - 263
Ę - 280 ę - 281
Ł - 321 ł - 322
Ń - 323 ń - 324
Ó - 211 ó - 243
Ś - 346 ś - 347
Ź - 377 ź - 378
Ż - 379 ż - 380

In get control range key codes is limit to 32 - 256. Only one key codes include in this range - Ó and ó.

Regards
Pawel
pawelu
 
Posts: 126
Joined: Thu Oct 06, 2005 10:18 pm
Location: Poland

Postby pawelu » Sun Jul 23, 2006 2:10 pm

Antonio,

I create temporary solution for that - I create copy class tget and change keychar method eg:

Code: Select all  Expand view  RUN
      case (nKey >= 32 .and. nKey < 256) .or. PlCorCode (@nKey)


where PlCorCode (nKey) is:

Code: Select all  Expand view  RUN
Static Function PlCorCode (nKey)

   Local i := 0
   Local lOk := .F.

   // key codes for PLWIN (Marchevka keyboard)
   //                Ą    Ć    Ę    Ł    Ń    Ó    Ś    Ź    Ż
   //                ą    ć    ę    ł    ń    ó    ś    ź    ż
   Static aPlMar := {260, 262, 280, 321, 323, 211, 346, 377, 379, ;
                     261, 263, 281, 322, 324, 243, 347, 378, 380}
   Static aPlCor := {165, 198, 202, 163, 209, 211, 140, 143, 175, ;
                     185, 230, 234, 179, 241, 243, 156, 159, 191}

   If (i := AScan (aPlMar, nKey)) > 0
      nKey := aPlCor[i]
      lOk := .T.
   Endif

Return lOk


Regards
Pawel
pawelu
 
Posts: 126
Joined: Thu Oct 06, 2005 10:18 pm
Location: Poland

Postby Antonio Linares » Sun Jul 23, 2006 8:21 pm

Pawel,

Very good :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42112
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 31 guests