Problem with inputwindow
Moderator: Rathinagiri
- luisvasquezcl
- Posts: 1258
- Joined: Thu Jul 31, 2008 3:23 am
- Location: Chile
- Contact:
Problem with inputwindow
Estimado Pablo,
con la versión de HMG 3.4.1 cambió el comportamiento de la funcion inputwindow en el caso de las fechas.
Con la versión anterior yo le pasaba el valor date() en el array Format para el caso del campo fecha y funcionaba correctamente, ahora se cae mostrando el siguiente error.
Date:18/07/2015 Time: 00:43:03
Error BASE/1070 Error de argumento: ==
Called from INPUTWINDOW(3491)
Called from EDITAR(137)
Called from (b)INV1400(134)
Bueno, cambié el argumento del format para el campo fecha y le puse "99/99/9999" y volví a compilar. Funciona bien excepto que no me permite cambiar la fecha y siempre me muestra "99/99/9999".
Ahora, si le cambio el argumento del array format a " ", me muestra el control fecha vacio que en cierta medida es correcto si el registro es nuevo, pero si en el arreglo aValues la fecha va con valor muestra igual el control vacio debiendo mostrar la fecha que le estoy pasando.
Estoy haciendo algo incorrecto?
Quedo atento a tus comentarios.
Te prepararé un ejemplo si es necesario.
Saludos cordiales,
Luis Vasquez.
Dear Paul,
HMG with version 3.4.1 changed the behavior of the function inputwindow in the case of dates.
With the previous version I was wrong value date () in the Format array for field case date and working properly now falls showing the following error.
Date: 07/18/2015 Time: 00:43:03
BASE Error / 1070 Argument Error: ==
Called from INPUTWINDOW (3491)
Called from EDIT (137)
Called from (b) INV1400 (134)
Well, I changed the format argument for the date field and put "99/99/9999" and compile again. It works fine except that I can not change the date and always shows me "99/99/9999".
Now, if I change the argument format array to "" shows me over empty date to some extent is correct if the record is new, but in the aValues settlement date will value shows just the empty control must show the date I'm going through.
Am I doing something wrong?
Stay tuned to your comments.
I'll make an example if necessary.
Best regards,
Luis Vasquez.
con la versión de HMG 3.4.1 cambió el comportamiento de la funcion inputwindow en el caso de las fechas.
Con la versión anterior yo le pasaba el valor date() en el array Format para el caso del campo fecha y funcionaba correctamente, ahora se cae mostrando el siguiente error.
Date:18/07/2015 Time: 00:43:03
Error BASE/1070 Error de argumento: ==
Called from INPUTWINDOW(3491)
Called from EDITAR(137)
Called from (b)INV1400(134)
Bueno, cambié el argumento del format para el campo fecha y le puse "99/99/9999" y volví a compilar. Funciona bien excepto que no me permite cambiar la fecha y siempre me muestra "99/99/9999".
Ahora, si le cambio el argumento del array format a " ", me muestra el control fecha vacio que en cierta medida es correcto si el registro es nuevo, pero si en el arreglo aValues la fecha va con valor muestra igual el control vacio debiendo mostrar la fecha que le estoy pasando.
Estoy haciendo algo incorrecto?
Quedo atento a tus comentarios.
Te prepararé un ejemplo si es necesario.
Saludos cordiales,
Luis Vasquez.
Dear Paul,
HMG with version 3.4.1 changed the behavior of the function inputwindow in the case of dates.
With the previous version I was wrong value date () in the Format array for field case date and working properly now falls showing the following error.
Date: 07/18/2015 Time: 00:43:03
BASE Error / 1070 Argument Error: ==
Called from INPUTWINDOW (3491)
Called from EDIT (137)
Called from (b) INV1400 (134)
Well, I changed the format argument for the date field and put "99/99/9999" and compile again. It works fine except that I can not change the date and always shows me "99/99/9999".
Now, if I change the argument format array to "" shows me over empty date to some extent is correct if the record is new, but in the aValues settlement date will value shows just the empty control must show the date I'm going through.
Am I doing something wrong?
Stay tuned to your comments.
I'll make an example if necessary.
Best regards,
Luis Vasquez.
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Problem with inputwindow
Hola Luis, gracias por tu participacion e interés en el InputWindow.
Voy a revisarlo.
Porque estuve revisando y en los campos DATE antes no aceptaba en forma de array. Fijate:
viewtopic.php?p=39702#p39702
Un gran abrazo !
Si Luis, fué adicionado para que acepte la propiedad Format, te acordás este tópico ?luisvasquezcl wrote:con la versión de HMG 3.4.1 cambió el comportamiento de la funcion inputwindow en el caso de las fechas.
Voy a revisarlo.
Pero o que no entiendo es que tu mencionas que siemrpe has utilizado el valor FORMAT en forma de array en las versiones anteriores. Puedes mostrarme un pequeño ejemplo como lo hacias ?luisvasquezcl wrote:Con la versión anterior yo le pasaba el valor date() en el array Format para el caso del campo fecha y funcionaba correctamente
Porque estuve revisando y en los campos DATE antes no aceptaba en forma de array. Fijate:
viewtopic.php?p=39702#p39702
Aqui hay algo errado que está haciendo Luis. Si procuras por "FORMAT" en el hmgdoc muestra como es la forma correct de utilizar el Date Format en DatePicker. Esto continua obedeciendo de la misma forma. No es igual al PICTURE que usábamos en Clipper. El Date Format que DatePicker, obedece a las instrucciones MSDN, es decir utiliza API del Windows y deben ser expresas de la siguiente forma:luisvasquezcl wrote:Bueno, cambié el argumento del format para el campo fecha y le puse "99/99/9999" y volví a compilar. Funciona bien excepto que no me permite cambiar la fecha y siempre me muestra "99/99/9999".
En mi opinion deberias utilizar sin pasarle el FORMAT en el InputWindow, es decir el FORMAT dejalo NIL. Y si quieres modificar el Date Format agregale a tu código al inicio: SET DATE TO BRITISH (por ejemplo).luisvasquezcl wrote:si en el arreglo aValues la fecha va con valor muestra igual el control vacio debiendo mostrar la fecha que le estoy pasando.
Estoy haciendo algo incorrecto?
Luis, esto es lo que más me gusta de vos. Sos una persona muy atenta, listo/abierto para el aprendizaje. Un gran abrazo hermano !luisvasquezcl wrote:Quedo atento a tus comentarios.
Si por favor !luisvasquezcl wrote:Te prepararé un ejemplo si es necesario.
Un gran abrazo !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- luisvasquezcl
- Posts: 1258
- Joined: Thu Jul 31, 2008 3:23 am
- Location: Chile
- Contact:
Re: Problem with inputwindow
Estimado Pablo,
Tal como dices tú, estaba pasando mal el argumento format a la función. con la versión HMG 3.4.0 me funcionaba bien pasandole como formato la función DATE() pero no releí la ayuda en donde dice claramente que hay cambio de formato. Lo siento.
Ahora paso el argumento vacío (nil) y funciona tal como quiero, te agradezco mucho tu ayuda y el soporte a esta función que como ya dije hace un tiempo, está genial.
Nuevamente gracias por tus palabras y tu ayuda.
Voy a preparar un demo para que veas lo que te estaba comentando.
Un abrazo para ti tambien,
saludos cordiales,
Luis Vasquez
Dear Paul,
As you say, it was going wrong format argument to the function. HMG with version 3.4.0 I work well as a format by passing the function DATE () but not reread the help which clearly says there reformatting. Sorry.
Now I pass the empty argument (nil) and it works the way I want, I really appreciate your help and support for this feature as I said a while ago, it is great.
Thanks again for your words and your help.
I go to prepare a demo so you can see what was commenting you.
A hug for you too,
best regards,
Luis Vasquez
Tal como dices tú, estaba pasando mal el argumento format a la función. con la versión HMG 3.4.0 me funcionaba bien pasandole como formato la función DATE() pero no releí la ayuda en donde dice claramente que hay cambio de formato. Lo siento.
Ahora paso el argumento vacío (nil) y funciona tal como quiero, te agradezco mucho tu ayuda y el soporte a esta función que como ya dije hace un tiempo, está genial.
Nuevamente gracias por tus palabras y tu ayuda.
Voy a preparar un demo para que veas lo que te estaba comentando.
Un abrazo para ti tambien,
saludos cordiales,
Luis Vasquez
Dear Paul,
As you say, it was going wrong format argument to the function. HMG with version 3.4.0 I work well as a format by passing the function DATE () but not reread the help which clearly says there reformatting. Sorry.
Now I pass the empty argument (nil) and it works the way I want, I really appreciate your help and support for this feature as I said a while ago, it is great.
Thanks again for your words and your help.
I go to prepare a demo so you can see what was commenting you.
A hug for you too,
best regards,
Luis Vasquez
- luisvasquezcl
- Posts: 1258
- Joined: Thu Jul 31, 2008 3:23 am
- Location: Chile
- Contact:
Re: Problem with inputwindow
Estimado,
incluyo el test acordado.
el boton que aplica el formato date() tal como lo hacía en la versión 3.4.0 ahora se cae
verifica el comportamiento que tiene el formato 2 al aplicar el space(2).
bueno compila el programa y verás a que me refiero.
Espero sirva para aclarar un poco los errores que pueden aparecer.
Pablo, ten en cuenta que los clipperos viejos como yo estamos acostumbrados al formato 99/99/9999 es por eso que ni siquiera lo pensé cuando la ayuda decía que habia que pasar un tipo de formato, jjejejeje, me pilló la costumbre.
Un abrazo y feliz fin de semana
Luis Vasquez.
Dear,
I included the agreed test.
the button that applies the formatting date () as it did in version 3.4.0 now falls
verifies the behavior that is formatted 2 to apply the space (2).
good compiles the program and you'll see what I mean.
I hope will serve to clarify some errors that may appear.
Paul note that old clipperos and I are accustomed to the format 99/99/9999's why I did not even think where aid had said that to pass a format type, jjejejeje, I caught the habit.
A hug and happy weekend
Luis Vasquez.
incluyo el test acordado.
el boton que aplica el formato date() tal como lo hacía en la versión 3.4.0 ahora se cae
verifica el comportamiento que tiene el formato 2 al aplicar el space(2).
bueno compila el programa y verás a que me refiero.
Espero sirva para aclarar un poco los errores que pueden aparecer.
Pablo, ten en cuenta que los clipperos viejos como yo estamos acostumbrados al formato 99/99/9999 es por eso que ni siquiera lo pensé cuando la ayuda decía que habia que pasar un tipo de formato, jjejejeje, me pilló la costumbre.
Un abrazo y feliz fin de semana
Luis Vasquez.
Dear,
I included the agreed test.
the button that applies the formatting date () as it did in version 3.4.0 now falls
verifies the behavior that is formatted 2 to apply the space (2).
good compiles the program and you'll see what I mean.
I hope will serve to clarify some errors that may appear.
Paul note that old clipperos and I are accustomed to the format 99/99/9999's why I did not even think where aid had said that to pass a format type, jjejejeje, I caught the habit.
A hug and happy weekend
Luis Vasquez.
- Attachments
-
- TestFecha.zip
- (574 Bytes) Downloaded 212 times
- luisvasquezcl
- Posts: 1258
- Joined: Thu Jul 31, 2008 3:23 am
- Location: Chile
- Contact:
Re: Problem with inputwindow
Estimado Pablo,
Hay un problema, al capturar el error con Begin-Recover-End, quedan definidas y se cae por doble definicion.
te adjunto un demo. Intenta ejecutar el boton 3 dos veces.
la primera vez captura el error y muestra el mensaje, al ejecutar el boton 3 nuevamente, se cae por doble definicion de la ventana.
Que pasa en esos casos? al salir del módulo que produjo el error queda la ventana _inputwindow creada en memoria hasta que se termine la aplicacion? Como podría eliminarla de memoria en este caso?.
Fijate que pasa en los siguientes casos.
1. Abre la ventana secundaria y al presionar el boton 3 dos veces se cae la aplicacion.
2. Abre la ventana secundaria, presiona el boton 3 una vez, verás el mensaje de error, acepta, y luego cierra la ventana secundaria. Ahora intenta abrir la ventana secundaria nuevamente.
Quedo atento a tus comentarios.
Saludos cordiales,
Luis Vásquez
Dear Paul,
There is a problem, to catch the error with Begin-Recover-End, and falls are defined by double definition.
I enclose a demo. Try running the button 3 twice.
The first catches the error and displays the message, executing the button 3 again, it falls by double definition of the window.
What happens in such cases? out of the module that caused the error is the _inputwindow window created in memory until the application is complete?
How could eliminate memory in this case ?.
Stay tuned to your comments.
Best regards,
Luis Vasquez.
Hay un problema, al capturar el error con Begin-Recover-End, quedan definidas y se cae por doble definicion.
te adjunto un demo. Intenta ejecutar el boton 3 dos veces.
la primera vez captura el error y muestra el mensaje, al ejecutar el boton 3 nuevamente, se cae por doble definicion de la ventana.
Que pasa en esos casos? al salir del módulo que produjo el error queda la ventana _inputwindow creada en memoria hasta que se termine la aplicacion? Como podría eliminarla de memoria en este caso?.
Fijate que pasa en los siguientes casos.
1. Abre la ventana secundaria y al presionar el boton 3 dos veces se cae la aplicacion.
2. Abre la ventana secundaria, presiona el boton 3 una vez, verás el mensaje de error, acepta, y luego cierra la ventana secundaria. Ahora intenta abrir la ventana secundaria nuevamente.
Quedo atento a tus comentarios.
Saludos cordiales,
Luis Vásquez
Dear Paul,
There is a problem, to catch the error with Begin-Recover-End, and falls are defined by double definition.
I enclose a demo. Try running the button 3 twice.
The first catches the error and displays the message, executing the button 3 again, it falls by double definition of the window.
What happens in such cases? out of the module that caused the error is the _inputwindow window created in memory until the application is complete?
How could eliminate memory in this case ?.
Stay tuned to your comments.
Best regards,
Luis Vasquez.
- Attachments
-
- TestFecha.zip
- (716 Bytes) Downloaded 212 times
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Problem with inputwindow
Hola Luis,
Gracias por tu participacion y por apuntar posible situaciones.
Disculpame que no te haya respondido antes.
Sobre todas las situaciones incomunes y que poderia ocasionar error.
Entonces substituye las siguientes lineas de tu archivo C:\hmg.3.4.1\SOURCE\h_controlmisc.prg:
Por esta aqui:
Debe reconstruir la biblioteca HMG con BuildLib.bat.
Sobre la fechas pude encontrar lo que considero un posible bug que se lo estoy reporteando a Claudio y se debe justamente a lo que te habia dicho anteriormente sobre SET DATE BRITISH. Para que este trabaje adecuadamente, Claudio irá analisar lo que le propuse para que sea considerado el lpszFormat y no como viene del Harbour/Clipper.
Por encuanto, hasta que Claudio se manifeste. Puedes colocar: SET DATE FORMAT TO "dd/MM/yyyy" en lugar de SET DATE BRITISH y te irá funcionar adecuadamente.
Un abrazo,
Gracias por tu participacion y por apuntar posible situaciones.
Disculpame que no te haya respondido antes.
Sobre todas las situaciones incomunes y que poderia ocasionar error.
Entonces substituye las siguientes lineas de tu archivo C:\hmg.3.4.1\SOURCE\h_controlmisc.prg:
Code: Select all
Case cType1 == 'D'
/* Probably need to be reforced as logical when is not a grid
If cType2 == "U"
aFormats[i]:=.T.
Endif */
DEFINE DATEPICKER &(CN)
PARENT "_InputWindow"
ROW nControlRow
COL nControlCol
WIDTH nCWidth
FONTBOLD aStyles[2,2]
TOOLTIP aToolTips[i]
VALUE aValues[i]
UPDOWN aFormats[i]
RIGHTALIGN lRightAlign
FORMAT aFormats[i]
If aFormats[i]==" "
// ONCHANGE _InputWindowSetDtFormat("_InputWindow", CN)
ONCHANGE SetProperty ( ThisWindow.Name, This.Name, "FORMAT", GetDateFormat() )
Endif
END DATEPICKER
Code: Select all
Case cType1 == 'D'
DEFINE DATEPICKER &(CN)
PARENT "_InputWindow"
ROW nControlRow
COL nControlCol
WIDTH nCWidth
FONTBOLD aStyles[2,2]
TOOLTIP aToolTips[i]
VALUE aValues[i]
If cType2 == "L"
UPDOWN aFormats[i]
Endif
RIGHTALIGN lRightAlign
If cType2 == "C" // aFormats[i] needs checked due different behaviour for on grid
If "9" $ aFormats[i]
MsgInfo("Default Dateformat was applied."+CRLF+"See hmgdoc for correct DateFormat.","Wrong DateFormat.")
aFormats[i] := Nil
Endif
FORMAT aFormats[i]
If aFormats[i]==" "
ONCHANGE SetProperty ( ThisWindow.Name, This.Name, "FORMAT", GetDateFormat() )
Endif
Endif
END DATEPICKER
Sobre la fechas pude encontrar lo que considero un posible bug que se lo estoy reporteando a Claudio y se debe justamente a lo que te habia dicho anteriormente sobre SET DATE BRITISH. Para que este trabaje adecuadamente, Claudio irá analisar lo que le propuse para que sea considerado el lpszFormat y no como viene del Harbour/Clipper.
Por encuanto, hasta que Claudio se manifeste. Puedes colocar: SET DATE FORMAT TO "dd/MM/yyyy" en lugar de SET DATE BRITISH y te irá funcionar adecuadamente.
Un abrazo,
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- luisvasquezcl
- Posts: 1258
- Joined: Thu Jul 31, 2008 3:23 am
- Location: Chile
- Contact:
Re: Problem with inputwindow
Estimado Pablo,
no necesitas disculparte, entiendo que no siempre hay la misma disponibilidad de tiempo para el foro. Bueno, agradezco tu respuesta, ya sé como evitar posibles errores por lo que al utilizar la función inputwindow tengo más cuidado con los parámetros.
En la medida que vayan apareciendo otros problemas los ire reportando para ir aportando mi granito de arena. Te comento que la he usado bastante y no he tenido ningún problemas hasta ahora.
Agradezco nuevamente tu tiempo y apoyo.
Saludos cordiales,
Luis Vásquez
Dear Paul,
no need to apologize, I understand that there is not always the same time available for the forum. Well, I appreciate your answer, and know how to avoid making mistakes when using the inputwindow have more careful with the parameters.
To the extent that other problems are appearing to go the ire reporting contributing my bit. I commented that I used a lot and have not had any problems so far.
Thank you again for your time and support.
Best regards,
Luis Vasquez
no necesitas disculparte, entiendo que no siempre hay la misma disponibilidad de tiempo para el foro. Bueno, agradezco tu respuesta, ya sé como evitar posibles errores por lo que al utilizar la función inputwindow tengo más cuidado con los parámetros.
En la medida que vayan apareciendo otros problemas los ire reportando para ir aportando mi granito de arena. Te comento que la he usado bastante y no he tenido ningún problemas hasta ahora.
Agradezco nuevamente tu tiempo y apoyo.
Saludos cordiales,
Luis Vásquez
Dear Paul,
no need to apologize, I understand that there is not always the same time available for the forum. Well, I appreciate your answer, and know how to avoid making mistakes when using the inputwindow have more careful with the parameters.
To the extent that other problems are appearing to go the ire reporting contributing my bit. I commented that I used a lot and have not had any problems so far.
Thank you again for your time and support.
Best regards,
Luis Vasquez
-
- Posts: 146
- Joined: Sat May 30, 2015 5:15 am
Re: Problem with inputwindow
boa tarde!
eu não consegui abrir um novo tópico do tipo: "ERROR BASE/1070 ARGUMENT ERROR ==" FORMULÁRIO WINDOW, então o que eu achei mais parecido com o problema que estou passando com o código abaixo:
Funciona do jeito que foi proposto.
Mas, do nada, de vez em quando, assim que executamos o módulo que chama o código acima, acontece um erro Error BASE/1070 Erro nos parâmetros: == na linha 4422.
Bom, a linha 4422, nada mais é que a última linha do código acima:
o programa continua em execução, mas, não aceita fazer nada.
Mas, se não clicar no erro pra encerrar, o erro continua em loop e parece que vai se multiplicando.
vejam, o tantão de tela que gerou↓: Por favor, se o Dr. Soto, Pablo, e, demais programadores e se possível o próprio criador da HMG, o Sr. Roberto Lopez puder me ajudar a entender...
grato
eu não consegui abrir um novo tópico do tipo: "ERROR BASE/1070 ARGUMENT ERROR ==" FORMULÁRIO WINDOW, então o que eu achei mais parecido com o problema que estou passando com o código abaixo:
Code: Select all
static function TELA_ENTRADA_GUI (PROGRAMA,SUB_TITULO,COR,ELEMENTO)
hb_Default(@ELEMENTO, space(1) )
mCD_VENDED := mCDOPERADO
Private fColor := { || if ( This.CellRowIndex/2 == int(This.CellRowIndex/2) , { 0,0,255 } , { 0,255,0 } ) }
mI := 1 // coloquei pra nao dar erro de limite de array 22/11/17w
// #ifndef gt1
// #include "HMG.CH"
// #endif
public _item := 1
public _codigo, _nome, _quantidade, _unitario, _subtotal, total_do_cupom
total_do_cupom := 0
DEFINE WINDOW Frm_TELA_ENTRADA ;
AT GetDesktopRealTop(),GetDesktopRealLeft() ;
TITLE PROGRAMA + SPACE (7) + SUB_TITULO ;
icon 'icone';
WIDTH GetDesktopRealWidth() HEIGHT GetDesktopRealHeight() ;
backcolor {223,223,223};
on init entrada();
ON INTERACTIVECLOSE CONFIRMA4 ('Deseja Cancelar sem Concluir', 6 ,'Orçamento'); // para confirmação
CHILD
/* descrição do produto */
define label label_descricao_produto_1
col 0
row 0
width getdesktopwidth()
height 30
value HB_AnsiToOem('DESCRIÇÃO DO PRODUTO')
fontname 'verdana'
fontsize 14
fontbold .F.
fontcolor {220,220,220}
backcolor {63,96,150}
end label
define label label_descricao_produto_2
col 0
row 30
width getdesktopwidth()
height 70
value ''
fontname 'verdana'
fontsize 32
fontbold .T.
fontcolor WHITE
backcolor {63,96,150}
end label
/*
digitação : código, quantidade ( preço unitário, subtotal )
*/
define label label_codigo
col 705
row 105
value HB_AnsiToOem('CÓDIGO DO PRODUTO')
autosize .T.
fontname 'verdana'
fontsize 14
fontbold .F.
fontcolor {78,78,78}
backcolor {223,223,223}
end label
@ 130,705 textbox tbox_codigo;
height 50;
width getdesktopwidth() - 715;
value 0;
font 'courier new' size 30;
bold;
numeric;
backcolor {223,223,223};
fontcolor BLUE;
rightalign;
on enter fCDPRODUTO_GUI()
// noborder
define label linha_separadora_1
col 700
row 200
value ''
width 1000
height 4
backcolor {168,168,168}
transparent .F.
end label
*
define label label_quantidade
col 705
row 210
value HB_AnsiToOem('QUANTIDADE')
autosize .T.
fontname 'verdana'
fontsize 14
fontbold .F.
fontcolor {78,78,78}
backcolor {223,223,223}
end label
@ 235,705 textbox tbox_quantidade;
height 50;
width getdesktopwidth() - 715;
value 0;
font 'courier new' size 30;
bold;
numeric;
backcolor {223,223,223};
fontcolor BLUE;
rightalign;
on enter adiciona_cupom()
// noborder
define label linha_separadora_2
col 700
row 305
value ''
width 1000
height 4
backcolor {168,168,168}
transparent .F.
end label
*
define label label_preco_unitario
col 705
row 315
value HB_AnsiToOem('PREÇO UNITÁRIO R$')
autosize .T.
fontname 'verdana'
fontsize 14
fontbold .F.
fontcolor {78,78,78}
backcolor {223,223,223}
end label
define label label_preco_unitario_2
col 750
row 340
value ''
autosize .T.
fontname 'courier new'
fontsize 30
fontbold .T.
fontcolor BLUE
backcolor {223,223,223}
end label
define label linha_separadora_3
col 700
row 410
value ''
width 1000
height 4
backcolor {168,168,168}
transparent .F.
end label
*
define label label_subtotal
col 705
row 420
value HB_AnsiToOem('SUBTOTAL R$')
autosize .T.
fontname 'verdana'
fontsize 14
fontbold .F.
fontcolor {78,78,78}
backcolor {223,223,223}
end label
define label label_subtotal_2
col 750
row 445
value ''
autosize .T.
fontname 'courier new'
fontsize 30
fontbold .T.
fontcolor BLUE
backcolor {223,223,223}
end label
define label linha_separadora_4
col 700
row 515
value ''
width 1000
height 4
backcolor {168,168,168}
transparent .F.
end label
/*
cupom fiscal
*/
define label label_cupom_1
col 0
row 100
width 700
height 70
value ''
backcolor {255,255,206}
end label
define label label_cupom_2
col 210
row 110
value HB_AnsiToOem('ORÇAMENTO') // era ('CUPOM FISCAL')
autosize .T.
fontname 'courier new'
fontsize 26
fontbold .T.
fontcolor BLACK
transparent .T.
end label
* cabeçalho
define label label_cab_cupom_1
col 5
row 150
value HB_AnsiToOem('Ítem')
autosize .T.
fontname 'courier new'
fontsize 10
fontbold .F.
fontcolor BLACK
transparent .T.
end label
define label label_cab_cupom_2
col 60
row 150
value HB_AnsiToOem('Código')
autosize .T.
fontname 'courier new'
fontsize 10
fontbold .F.
fontcolor BLACK
transparent .T.
end label
define label label_cab_cupom_3
col 160
row 150
value HB_AnsiToOem('Descrição')
autosize .T.
fontname 'courier new'
fontsize 10
fontbold .F.
fontcolor BLACK
transparent .T.
end label
define label label_cab_cupom_4
col 370
row 150
value HB_AnsiToOem('Qtd.')
autosize .T.
fontname 'courier new'
fontsize 10
fontbold .F.
fontcolor BLACK
transparent .T.
end label
define label label_cab_cupom_5
col 430
row 150
value HB_AnsiToOem('Unitário R$')
autosize .T.
fontname 'courier new'
fontsize 10
fontbold .F.
fontcolor BLACK
transparent .T.
end label
define label label_cab_cupom_6
col 550
row 150
value HB_AnsiToOem('SubTotal R$')
autosize .T.
fontname 'courier new'
fontsize 10
fontbold .F.
fontcolor BLACK
transparent .T.
end label
* grid
define grid grid_cupom
col 0
row 170
width 700
height Frm_TELA_ENTRADA.height - 260
headers {'Ítem','Código','Descrição','Qtd.','Unitário R$','SubTotal R$'}
widths {50,100,200,50,120,120}
fontname 'courier new'
fontsize 10
fontbold .T.
backcolor {255,255,206}
fontcolor BLACK
nolines .T.
showheaders .F.
end grid
/*
rodapé : informações
*/
define label label_rodape_1
col 0
row Frm_TELA_ENTRADA.height - 90
width getdesktopwidth()
height 100
value ''
backcolor BLACK
end label
define label label_fecha_cupom
col getdesktopwidth()-350
row getdesktopheight()-160
value HB_AnsiToOem('F9 :: FECHAR ORÇAMENTO')
autosize .T.
fontname 'verdana'
fontsize 16
fontbold .T.
fontcolor {165,0,0}
transparent .T.
end label
define label label_consulta_arquivo
col getdesktopwidth()-550
row getdesktopheight()-180
value HB_AnsiToOem('F4 :: CONSULTA PRODUTOS')
autosize .T.
fontname 'verdana'
fontsize 10
fontbold .T.
fontcolor {165,0,0}
transparent .T.
end label
define label label_cancela_item
col getdesktopwidth()-550
row getdesktopheight()-190
value HB_AnsiToOem('F1 :: CANCELA ÍTEM')
autosize .T.
fontname 'verdana'
fontsize 10
fontbold .T.
fontcolor {165,0,0}
transparent .T.
end label
/*
data e relógio
*/
define timer timer_relogio;
interval 1000;
action Frm_TELA_ENTRADA.label_relogio.value := time()
define label label_relogio
col getdesktopwidth()-115
row getdesktopheight()-85
value ''
autosize .T.
fontname 'courier new'
fontsize 14
fontbold .T.
fontcolor {100,100,100}
transparent .T.
end label
define label label_data
col getdesktopwidth()-300
row getdesktopheight()-85
value HB_AnsiToOem(upper(dia_da_semana(date(),2))+','+strzero(day(date()),2)+'/'+upper(mes_do_ano(month(date()),1))+'/'+strzero(year(date()),4))
autosize .T.
fontname 'courier new'
fontsize 14
fontbold .T.
fontcolor {100,100,100}
transparent .T.
end label
on key F9 action fecha_cupom()
on key escape action CONFIRMA4 ('Deseja Cancelar sem Concluir', 6 ,'Orçamento')
Frm_TELA_ENTRADA.center
Frm_TELA_ENTRADA.activate
return
Mas, do nada, de vez em quando, assim que executamos o módulo que chama o código acima, acontece um erro Error BASE/1070 Erro nos parâmetros: == na linha 4422.
Bom, a linha 4422, nada mais é que a última linha do código acima:
Code: Select all
Frm_TELA_ENTRADA.activate
Mas, se não clicar no erro pra encerrar, o erro continua em loop e parece que vai se multiplicando.
vejam, o tantão de tela que gerou↓: Por favor, se o Dr. Soto, Pablo, e, demais programadores e se possível o próprio criador da HMG, o Sr. Roberto Lopez puder me ajudar a entender...
grato
- serge_girard
- Posts: 3165
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Problem with inputwindow
May be a recursive error (error in deferror)
Serge
Serge
There's nothing you can do that can't be done...
-
- Posts: 146
- Joined: Sat May 30, 2015 5:15 am
Re: Problem with inputwindow
mas então Serge_Girard como resolver essa pendenga?