Dialog in NOWAIT modal goes in LOOP

Dialog in NOWAIT modal goes in LOOP

Postby damianodec » Thu Jul 05, 2007 6:49 am

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?
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Postby Antonio Linares » Thu Jul 05, 2007 10:57 am

Try it commenting out this line:

// oWndChild:bGotFocus = { || m_get[02]:SetFocus() }
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby damianodec » Thu Jul 05, 2007 11:28 am

It's the same
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Postby Antonio Linares » Thu Jul 05, 2007 4:58 pm

Is you comment out all these lines, do the MDICHILD appear and work fine ?

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby damianodec » Fri Jul 06, 2007 9:11 am

I put comments.... but the MDICHILD goes loop !
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Postby Antonio Linares » Fri Jul 06, 2007 11:57 am

Comment out this line too:

// ACTIVATE WINDOW oWndChild
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby damianodec » Fri Jul 06, 2007 12:27 pm

no changes.... :lol:
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Postby Antonio Linares » Fri Jul 06, 2007 7:26 pm

Damiano,

Please use TestMdi4.prg as a template and modify it for your own needs. Or please provide a self contained sample to reproduce the error, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Dialog in NOWAIT modal goes in LOOP

Postby ssbbs » Sat Jul 07, 2007 1:58 am

damianodec wrote:when I run my apps the dialog MYDIALOG goes in LOOP...
why?


do you have modify file .rc ?
User avatar
ssbbs
 
Posts: 104
Joined: Mon Oct 17, 2005 3:03 am
Location: Taiwan

Postby damianodec » Sat Jul 07, 2007 5:21 am

sgrunt....
if I use my apps and I run my personal antivirus on my pc the dialog goes loop. If I close antivirus.... dialog it's OK....
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Postby Antonio Linares » Sat Jul 07, 2007 5:50 am

What antivirus do you use ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby damianodec » Sat Jul 07, 2007 6:38 am

Norton Internet security, but I thinks that problem is on my PC, because I use my apps another PC with norton and it's OK.
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 32 guests

cron