FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Dialog in NOWAIT modal goes in LOOP
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Dialog in NOWAIT modal goes in LOOP
Posted: Thu Jul 05, 2007 06: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?

FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Dialog in NOWAIT modal goes in LOOP
Posted: 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
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Dialog in NOWAIT modal goes in LOOP
Posted: Thu Jul 05, 2007 11:28 AM

It's the same

FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Dialog in NOWAIT modal goes in LOOP
Posted: Thu Jul 05, 2007 04: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
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Dialog in NOWAIT modal goes in LOOP
Posted: Fri Jul 06, 2007 09:11 AM

I put comments.... but the MDICHILD goes loop !

FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Dialog in NOWAIT modal goes in LOOP
Posted: Fri Jul 06, 2007 11:57 AM

Comment out this line too:

// ACTIVATE WINDOW oWndChild

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Dialog in NOWAIT modal goes in LOOP
Posted: Fri Jul 06, 2007 12:27 PM

no changes.... :lol:

FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Dialog in NOWAIT modal goes in LOOP
Posted: Fri Jul 06, 2007 07: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
Posts: 129
Joined: Mon Oct 17, 2005 03:03 AM
Re: Dialog in NOWAIT modal goes in LOOP
Posted: Sat Jul 07, 2007 01:58 AM
damianodec wrote:
when I run my apps the dialog MYDIALOG goes in LOOP...
why?


do you have modify file .rc ?
line ID: ssbbstw

WeChat ID: ssbbstw
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Dialog in NOWAIT modal goes in LOOP
Posted: Sat Jul 07, 2007 05: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....

FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Dialog in NOWAIT modal goes in LOOP
Posted: Sat Jul 07, 2007 05:50 AM

What antivirus do you use ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Dialog in NOWAIT modal goes in LOOP
Posted: Sat Jul 07, 2007 06: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.

FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)

Continue the discussion