FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Get and picture problem
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Get and picture problem
Posted: Thu May 12, 2016 08:54 AM
Hello everybody,
I have a problem with the use of picture with the get, If i compile and run this piece of code:
Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   local oDlg
   LOCAL cPict := "@KE 9999XXN "
   LOCAL cInput := "/*AUTO*/"
   
   DEFINE DIALOG oDlg 
   @ 1,1  GET cInput PICTURE cPict
   ACTIVATE DIALOG oDlg CENTERED
return nil

I get this result:


Instead in the console version:
Code (fw): Select all Collapse
proc main
   LOCAL cPict := "@KE 9999XXN "
   LOCAL cInput := "/*AUTO*/"
   CLS
   @ 1,1 SAY "TEST" GET cInput PICTURE cInput
   READ
return

I get:


any hint?
Thanks,
Antonino

PS. I am using the 15.3 version
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Get and picture problem
Posted: Thu May 12, 2016 10:42 AM

Antonino,

What is the purpose of it ?

I cant write in the GET and when I can, it ends

If the user can't write in it, you can avoid the picture and disable the GET

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Get and picture problem
Posted: Thu May 12, 2016 10:49 AM

What do you get for
? transform( "/AUTO/", "@KE 9999XXN " )

Regards



G. N. Rao.

Hyderabad, India
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Re: Get and picture problem
Posted: Thu May 12, 2016 01:28 PM
nageswaragunupudi wrote:
What do you get for
? transform( "/*AUTO*/", "@KE 9999XXN " )

I think it is the point, the transform and the get pictures are different, for the GET it should be translated:

  • K means clear the input at first input[/*:m]
  • E date and number in the European way: the day before the month for the date and the comma for decimal[/*:m]
  • 9 in this position only digit are allowed as input[/*:m]
  • N Allows only alphabetic and numeric characters[/*:m]
  • X Allows any character[/*:m][/list:u]
    see http://www.ousob.com/ng/clguide/ng73148.php
    for translate it should be translated:

    • K is ignored, in transform it is not used[/*:m]
    • E the date is in the European way: the day before the month, in this case take my 6 letter input and swap the "/*" and "UT" and replace A and O with the / because it think it is a date.[/*:m]
    • 9, N, X Displays digits for any data type[/*:m][/list:u]
      see http://www.ousob.com/ng/clguide/ng6b445.php

      Antonio Linares wrote:Antonino,

      What is the purpose of it ?

      I cant write in the GET and when I can, it ends

      If the user can't write in it, you can avoid the picture and disable the GET


      It is a really strange behavior... I don't explain it... someone has the clipper compiler for test this code in it?

      It is code that I inherit.


      Anyway, using xHarbour.com 1.2.1 and FiveWin 9.04 the text inside the get is correct.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Get and picture problem
Posted: Fri May 13, 2016 05:04 AM
Antonino,

As Rao has very clever pointed, it is a Harbour/xHarbour function Transform() issue

I have just built it using xHarbour and FWH 16.04 and it looks (almost) same as Clipper:

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Re: Get and picture problem
Posted: Fri May 13, 2016 07:16 AM
I see that the console version does not work too.
The code I provided is wrong:
Code (fw): Select all Collapse
@ 1,1 SAY "TEST" GET cInput PICTURE cInput

bust be
Code (fw): Select all Collapse
@ 1,1 SAY "TEST" GET cInput PICTURE cPict

It confirms it is not a FiveWin problem.
I am searching assistance by the harbour developers.
Regards.
Antonino
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Get and picture problem
Posted: Fri May 13, 2016 07:45 AM

I missed that too :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion