I try the PRG TESTMDI4.PRG in folder SAMPLES, when I run it is ok, then i try my prg:
in the file a.prg there's
static oWnd
.....
DEFINE WINDOW oWnd ;
TITLE "Proc A" ;
MDI ;
MENU BuildMenu() ;
ICON oIcon
....
ACTIVATE WINDOW oWnd ;
VALID MsgYesNo( "exit?","Select" )
....
function BuildMenu()
local oMenu
MENU oMenu
MENUITEM "&Print"
MENU
MENUITEM "Apps A" ACTION dialog0("1",@oWnd) ;
MESSAGE "Elaborazione"
.....
in the file b.prg there's:
local m_get[20]
.....
dialog1(@sw,@m_get,@oWnd)
.....
FUNCTION dialog1(sw, ;
m_get,oWnd ;
)
local BtnOk
local BtnEsc
local oFont
local oWndChild
DEFINE WINDOW oWndChild MDICHILD OF oWnd
oWndChild:bGotFocus = { || m_get[02]:SetFocus() }
DEFINE DIALOG m_get[02] RESOURCE "mydialog" OF oWndChild
REDEFINE GET m_get[03] ID 101 OF m_get[02] ;
PICTURE "@ 99/99/9999"
REDEFINE METER m_get[4] VAR m_get[5] ID 501 TOTAL 1000 OF m_get[02]
REDEFINE BTNBMP BtnOk ID 1 OF m_get[02] RESOURCE "CONFERMA" ;
ACTION (stassiv11(@sw,@m_get))
REDEFINE BTNBMP BtnEsc ID 2 OF m_get[02] RESOURCE "ESCI" ;
ACTION (sw:=0, oWndChild:End())
ACTIVATE DIALOG m_get[2] NOWAIT ;
ON INIT m_get[02]:Move( 0, 0 ) ;
VALID ( oWndChild:End(), .t. ) CENTERED
ACTIVATE WINDOW oWndChild ;
ON INIT oWndChild:SetSize( m_get[02]:nWidth, m_get[02]:nHeight )
Return NIL
when I run my apps the dialog MYDIALOG goes in LOOP...
why?