Jump to content
Fivewin Brasil

Problema no Get Modo Console


maudruidas

Recommended Posts

Boa tarde, tenho um sistema antigo em modo console que está compilado com o Fivewin. No meu GET tenho um VADID que quando retorna .F. o campo numérico tem de ser apagado pelo cliente para poder ser digitado o novo número, ele não apaga automaticamente. Alguém saberia me dizer porque acontece isto?.

ex:  ao entrar foi digitato [      23] . O sistema mostra "estoque insuficiente". Ao retornar [2    23]. Ao digitar o 2 ele não apaga o 23. Tenho de apagar 23 primeiro para depois digitar o 2.

Se eu retornar .T. ele vai para o próximo campo, seu retornar para o campo anterior onde o estoque estava insuficiente ele funciona, ou seja todos os campos gets com valid que retornam .F. estão fazendo isto.

 

Obrigado.

 

 

 

Link to comment
Share on other sites

Boa tarde, obrigado por responder. Já havia tentado fazer isto porém a varável do get não assume o valor zero (por exemplo), acho que por ainda estar dentro do mesmo get e em um valid.

Veja como é meu programa

      @04,03 SAY "Vendedor........:" GET VEN PICT "999" VALID FUNVEN(VEN)  // Busca o vendedor

 

FUNCTION FUNVEN(XVEN)
  SAVE SCREEN TO TEL3
  FALI := ALIAS()
  SELE 5
  SET ORDER TO 1
  SEEK STR(XVEN,3)
  IF EOF()
     MSG("Vendedor N„o Cadastrado, Tecle ENTER...")
     REST SCREEN FROM TEL3
     SELE &FALI
     SET COLOR TO N/W
     RETURN(.F.)
  ENDIF
  SPA = 78-COL()
  @ROW(),COL() SAY SPACE(SPA)
  @ROW(),COL()-SPA+3 SAY ALLTRIM(NOME)
  SELE &FALI
  RETURN(.T.)
 

Você diz para eu zerar a variável ven antes de retornar, correto?

   SELE &FALI
   SET COLOR TO N/W

  VEN := 0
   RETURN(.F.)

 

 

Link to comment
Share on other sites

Boa noite, o que eu percebi é que variável está aceitando o valor quando coloco zero, mas o GET não funciona mais de forma correta, o número anterior vai para a direita do campo e o novo valor quando digitado fica na esquerda e não apaga o da direita ao teclar o novo número. Vejam o vídeo que gravei demonstrando o que está acontecendo. 

Vejam se este link abre o vídeo

https://1drv.ms/u/s!At7iPtV8NRXt2Cj3wL_flnMQaOFJ?e=OLOkEt

Link to comment
Share on other sites

Picture Codes
	 Say Picture Functions
 B  Display numbers left-justified    ¦ X  Display DB after negative numbers
 C  Display CR after positive numbers ¦ Z  Display zeros as blanks
 D  Display date in SET DATE format   ¦ (  Enclose negative numbers in parens
 E  Display date in British format    ¦ !  Convert alpha characters to upper
 R  Insert non-template characters    ¦
 Say Picture Template Symbols
 A  Display digits for any data type  ¦ !  Convert alpha character to upper
 N   "                                ¦ $  Display dollar sign instead of
 X   "                                ¦    leading space in a numeric
 9   "                                ¦ *  Display asterisk instead of
 #   "                                ¦    leading space in a numeric
 L  Display logicals as "T" or "F"    ¦ .  Specify a decimal point position
 Y  Display logicals as "Y" or "N"    ¦ ,  Specify a comma position
 Get Picture Functions
 A     C     Allow only alpha characters
 B     N     Display numbers left-justified
 C     N     Display CR after positive numbers
 D     D,N   Display dates in SET DATE format
 E     D,N   Display dates with day and month inverted
             independent of the current DATE SETting,
             numerics with comma and period reverse
 K     All   Delete default text if first key is not a cursor key
 R     C     Insert non-template characters in the display but do not
             save in the Get variable
 S<n>  C     Allows horizontal scrolling within a Get.  <n> is an integer
             that specifies the width of the region
 X     N     Display DB after negative numbers
 Z     N     Display zero as blanks
 (     N     Display negative numbers in parentheses with leading spaces
 )     N     Display negative numbers in parentheses without leading spaces
 !     C     Convert alphabetic character to upper case
 Get Picture Template Symbols
 A    Allow only alphabetic characters
 N    Allow only alphabetic and numeric characters
 X    Allow any character
 9    Allow digits for any data type including sign for numerics
 #    Allow digits, signs and spaces for any data type
 L    Allow only T, F, Y or N
 Y    Allow only Y or N
 !    Convert alphabetic character to upper case
 $    Display a dollar sign in place of a leading space in a numeric
 *    Display an asterisk in place of a leading space in a numeric
 .    Display a decimal point
 ,    Display a comma
 


Link to comment
Share on other sites

17 horas atrás, Jmsilva disse:

Provavelmente vc declarou como local e usou @

 

 @04,03 SAY "Vendedor........:" GET VEN PICT "999" VALID FUNVEN(@VEN)  // Busca o vendedor

 

Tenta assim

 

Acho que Jmsilva já te passou a solução. FunVen( @Ven ). Verifique a presença do @ quando passa a variável.

Link to comment
Share on other sites

16 horas atrás, maudruidas disse:

Bom dia, ainda não deu certo. Kapiaba eu já havia tentado o "@ 999", conforme o Aferra havia pedido. É muito estranho. Por enquanto eu agradeço pela ajuda, se alguém descobrir favor postar aqui, vou continuar pesquisando sobre o assunto.

Se puder postar código da rotina ajuda!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...