Not a normal use.
A GTWVG routine on one thread updates fivewin dialog on another thread, and closes at the end.
But when an error occurs, GTWVG routines closes, and no other routine can close the fivewin dialog.
At momment, I can think only on create another thread, using my old wrapper:
CREATE CLASS RunWhileThreadClass
VAR lExit INIT .F.
VAR nThreadId
VAR nInterval INIT 600
VAR cWindowTitle INIT ""
VAR bCode
METHOD New() INLINE ::nThreadId := hb_ThreadSelf(), SELF
METHOD Execute( bCode )
ENDCLASS
METHOD Execute( bCode ) CLASS RunWhileThreadClass
LOCAL nCont
hb_gtReload( "WVG" )
IF bCode != Nil
::bCode := bCode
ENDIF
AppInitSets()
HB_GtInfo( HB_GTI_WINTITLE, ::cWindowTitle )
//wvgSetAppWindow():Hide()
DO WHILE ! ::lExit
Eval( ::bCode )
FOR nCont = 1 TO ::nInterval
//hb_ReleaseCPU()
IF hb_ThreadWait( ::nThreadId, 0.1, .T. ) == 1
::lExit := .T.
ENDIF
Inkey(1)
IF ::lExit
EXIT
ENDIF
NEXT
ENDDO
//hb_gcAll(.T.)
RETURN NilWhat is does ?
It checks if another thread is running.
If another thread stop, it closes current thread.
On fivewin use, it could check gtwvg thread, and closes fivewin dialog before closes itself.
Note:
My Main routine is anything like this:
hb_ThreadStart( { || Sistema( hb_ArrayToParams( aParamList ) ) } )
Inkey(1)
hb_ThreadWaitForAll()
RETURNIt closes application when no other thread is running.
But a fivewin dialog is a thread, can't close while a dialog is running.
Does anybody have a suggestion ?
José M. C. Quintas Brazil
gtwvg, fivewin 25.12, hwgui, mingw 15.2 (32 bits)