Get and picture problem

Get and picture problem

Postby AntoninoP » Thu May 12, 2016 8: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: Select all  Expand view
#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:
Image

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

I get:
Image

any hint?
Thanks,
Antonino

PS. I am using the 15.3 version
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy

Re: Get and picture problem

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Get and picture problem

Postby nageswaragunupudi » Thu May 12, 2016 10:49 am

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Get and picture problem

Postby AntoninoP » Thu May 12, 2016 1: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
  • E date and number in the European way: the day before the month for the date and the comma for decimal
  • 9 in this position only digit are allowed as input
  • N Allows only alphabetic and numeric characters
  • X Allows any character
see http://www.ousob.com/ng/clguide/ng73148.php
for translate it should be translated:
  • K is ignored, in transform it is not used
  • 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.
  • 9, N, X Displays digits for any data type
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.
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy

Re: Get and picture problem

Postby Antonio Linares » Fri May 13, 2016 5: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:

Image
regards, saludos

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

Re: Get and picture problem

Postby AntoninoP » Fri May 13, 2016 7:16 am

I see that the console version does not work too.
The code I provided is wrong:
Code: Select all  Expand view
@ 1,1 SAY "TEST" GET cInput PICTURE cInput

bust be
Code: Select all  Expand view
@ 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
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy

Re: Get and picture problem

Postby Antonio Linares » Fri May 13, 2016 7:45 am

I missed that too :-)
regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 95 guests