FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour GET Bug!!
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
GET Bug!!
Posted: Thu Jan 21, 2016 04:46 PM

Now i say on new FWH that all gets ignore the picture (Only on REDEFINE?)! Please try "@!". The letters are not uppercase!
Also the oGet:bPostKey not functioning. I linked in a older tget.prg and all is ok!
Thats strange!

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: GET Bug!!
Posted: Thu Jan 21, 2016 04:58 PM

For normal ANSI applications (if we do not set FW_SetUnicode( .t. )), Gets work as usual. All picture clauses work as usual, without any change. In other words, existing applications work as before.

In Unicode applications, i.e., when we set FW_SetUnicode( .t. ), Gets for character values do not obey any picture clause. Gets for other data-types work as usual.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: GET Bug!!
Posted: Thu Jan 21, 2016 05:07 PM
Please test this code:
I use now PICTURE "@R 99.99.99.99.99" and you can see that is ignored!! And also the oGet:bPostkey is not executed!
Code (fw): Select all Collapse
function abnormal(oWnd)
local oDlg, oTimer , oSay , cSay := " " , oGet , cGet := space(10) , cBuffer

    DEFINE TIMER oTimer INTERVAL 1000 OF oWnd
    DEFINE DIALOG oDlg OF oWnd
    @ 1, 2 GET oGet VAR cGet PICTURE "@R 99.99.99.99.99" SIZE 100,15//@!"
        oGet:bPostKey := {|x,buffer|if(empty(buffer),NIL,;
        (oTimer:bAction:={||NIL},;
        cBuffer := buffer,;
        oTimer:bAction:={||msgrun("Test","Test",{||(cSay := cBuffer, oSay:refresh(),oTimer:deactivate())})},;
        oTimer:activate()))}
        @ 2, 2 SAY oSay PROMPT cSay SIZE 50,15
    @ 50,10 RBBTN PROMPT "&End" OF oDlg SIZE 50,15 ACTION oDlg:End()
    ACTIVATE DIALOG oDlg CENTERED


return nil
Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: GET Bug!!
Posted: Thu Jan 21, 2016 05:33 PM
Test
Code (fw): Select all Collapse
function TestGet1()

   local oDlg, oGet, cGet := Space(10)
   local oFont

   DEFINE FONT oFont NAME "ARIAL" SIZE 0,-16
   DEFINE DIALOG oDlg FONT oFont

   @ 10,10 GET oGet VAR cGet PICTURE "@R 99.99.99.99.99" SIZE 70,13 PIXEL OF oDlg
   @ 40,10 BUTTON "TEST" SIZE 40,14 PIXEL OF oDlg ACTION MsgInfo( cGet )

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont
   ? cGet

return nil




This shows that Get displays the value entered as formatted with the picture clause and the value returned by the Get is what is expected from the Get.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: GET Bug!!
Posted: Fri Jan 22, 2016 08:49 AM

Mr. Nages, please excuse that i have wasted your precious time!
I`m not checked, that i had used fw_setunicode(.T.) for test purposes. :oops: :oops:

Regards,
Günther
---------------------------------
office@byte-one.com

Continue the discussion