Page 1 of 1

ERROR con un DEFINE WINDOW

Posted: Wed May 24, 2023 3:58 am
by jorge_rivero
Hola a Todos, algo raro pasa cuando compilo con:
Harbour MiniGUI Extended Edition 23.02,03 y 04
no prove con otrasa versiones, ya que me parece imposible ese error.
Trabajo en una ventana definida asi:
DEFINE WINDOW Main01 AT 78,3 WIDTH nW-5 HEIGHT nH-120 ;
WINDOWTYPE MODAL NOSIZE NOSYSMENU NOCAPTION ;
ON RELEASE (DoMethod('Main_1', ;
'Bt_Opc_2','Release'),SETPROPERTY('Main_1',;
_Opc,'Enabled',.T.),DoMethod('Main_1',_Opc,;
'Show'),SETPROPERTY('Main_1','Bt_Exit', ;
'Enabled',.T.))

ON KEY ESCAPE OF Main01 ACTION Salida_Color()
ON KEY CTRL+ALT+C ACTION This.release()
Turno_Opc()
END WINDOW
Eso es el incio.
uso a varios procesos, en un momento dado me da el error:
Error MGERROR/0 Window: Main01 is not defined. Program terminated.
Es como si de alguna forma se pierde la ventana, y no tengo ningun RELEASE
Pruebo ingresando lo siguiente:
msgdebug(thiswindow.name)
y justo alli me da el error, como si la venntana no esta definida.
La verdad no entiendo si es la compilacion el error.
Jamas tuve un problema con eso, por alguna razon lo hace ahora,
esto pasa despues de usar como 5 controles y una confirmacion, alli me pasa esto
alguien sabe de esto???

Re: ERROR con un DEFINE WINDOW

Posted: Wed May 24, 2023 6:10 am
by mol
It's very hard to find error if you don't pass even a little sample

Re: ERROR con un DEFINE WINDOW

Posted: Wed May 24, 2023 7:16 am
by serge_girard
Main_1 and Main01 are the same??

Serge

Re: ERROR con un DEFINE WINDOW

Posted: Wed May 24, 2023 1:14 pm
by jorge_rivero
Main_1 es la ventana principal, esa funciona bien, el tema pasa en esta ventana, trabajo tranquilo hasta que en un momento al ejecutar un inser en mariadb, al terminar me da ese errror

Re: ERROR con un DEFINE WINDOW

Posted: Wed May 24, 2023 1:45 pm
by dragancesu
Like Serge say, you close main window from modal

Code: Select all

ON RELEASE (DoMethod('Main_1', 'Bt_Opc_2','Release'), SETPROPERTY('Main_1',_Opc,'Enabled',.T.), DoMethod('Main_1',_Opc,'Show'), SETPROPERTY('Main_1', 'Bt_Exit', 'Enabled',.T.))

Re: ERROR con un DEFINE WINDOW

Posted: Thu May 25, 2023 4:38 pm
by franco
I have trouble reading your code but:
At one time long ago I use to go to a program from a window and at the end of the program I wanted to release the window I came from
so I would release it before return. On return there was no window to return to so I found I had to release the window after returning to the
window.