Here is a small sample for the problem ...
- Code: Select all Expand view
#include "FiveWin.ch"
#include "InKey.ch"
#include "xBrowse.ch"
function sal_orders()
private oChild, oBrw
private cAls := oApp:GetNewAlias( "SALES" )
if !oApp:OpenNewAlias( "SALES", cAls )
return( NIL )
endif
select( cAls )
DEFINE WINDOW oChild TITLE "Sales orders" MDICHILD OF oApp:oWnd
@ 0,0 XBROWSE oBrw OF oChild ALIAS Alias()
oBrw:CreateFromCode()
oBrw:cToolTip = "This is a sales orders"
oChild:oClient := oBrw
oChild:bValid := { || ( .t., MsgInfo( "before" ), ( cAls )->( dbclosearea() ), MsgInfo( "after" ) ) }
ACTIVATE WINDOW oChild ON INIT oBrw:SetFocus()
return( NIL )
I'm running prgs as scripts from hb_hrbrun() function . This sample is working , but ending this window , the main program hangs up and I must to close through task manager . The main reason of hangs up is oChild:bValid row - "after" msg doesn't appears . If comment this row , all is working OK . But I must to close this alias .. . It seems that hb_hrbrun can't to do validation codeblock for window or close alias ... Tried without dbclosearea() - the same . So maybe it's problem of execution of codeblock ...
Thanks in advance for any ideas or comment !
Working enviroment : FW 9.05 , Harbour 2.0 a beta , BCC 5.5.1