FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour MsgRun() - strange problem
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
MsgRun() - strange problem
Posted: Wed Feb 22, 2006 03:43 PM

Hi Everybody,

I have a strange problem with MsgRun().
I use MsgRun to call a function that opens a file selection dialog.
After I select the file, the file selection dialog closes but for some reason I
need to put my mouse in the "Please Wait..." dialog before my program will continue or I need to press a key on the keyboard.

MsgRun("Please Wait ... Reading CD","Please Wait", {|| ReadCD() })
(ReadCD() function is below)

Any ideas as to what I am doing wrong?

Thanks,

Jeff

Function ReadCD()
Private cNewFile, nLen, nError, cFile, cFileDir
if lFirstRun
cFileDir := cGetFile32("Cascade Data Files |.smd|"+ ;
"Easy II Video Data Files |
.eas|" + ;
"Sierra Wave Data Files |.sd|" ;
,"Select a file to Review")
lFirstRun := .f.
cExt := upper( RIGHT( cFileDir, 3 ) )
else
if cExt = "SMD"
cFileDir := cGetFile32("Cascade Data Files |
.smd|"+ ;
"Easy II Video Data Files |.eas|" + ;
"Sierra Wave Data Files |
.sd|" ;
,"Select a file to Review")
cExt := upper( RIGHT( cFileDir, 3 ) )
elseif cExt = "EAS"
cFileDir := cGetFile32("Easy II Video Data Files |.eas|" + ;
"Sierra Wave Data Files |
.sd|"+;
"Cascade Data Files |.smd|" ;
,"Select a file to Review")
cExt := upper( RIGHT( cFileDir, 3 ) )
else
cFileDir := cGetFile32("Sierra Wave Data Files |
.sd|"+ ;
"Easy II Video Data Files |.eas|" + ;
"Cascade Data Files |
.smd|" ;
,"Select a file to Review")
cExt := upper( RIGHT( cFileDir, 3 ) )
endif
endif
nLen:= Len(alltrim(cFileDir))
cFile = Right(cFileDir, nLen-3)
MsgRun("Please Wait ... Extracting Files From CD","Please Wait", {|| CopyWave() })
Return nil

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
MsgRun() - strange problem
Posted: Wed Feb 22, 2006 04:21 PM

Jeff,

It might be a problem because you are calling a new msgWait() from one already running. Try adding a sysrefresh() at the end of the codeblock.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
MsgRun() - strange problem
Posted: Wed Feb 22, 2006 04:50 PM

James,

After a bit of testing, it looks like the problem is with cGetFile32.

I used MsgWait("Test", "Test" , 2) both before and after the cGetFile32.

When it is before, I get my test message.
When it is after, I do not see the test message until I either put my mouse in the "Please Wait" dialog or press a key.

I have also removed the other MsgRun() when I ran this test.

Jeff

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
MsgRun() - strange problem
Posted: Wed Feb 22, 2006 05:13 PM

Jeff,

Try a sysrefresh() after cGetFile32(). Also, I think you can call cGetFile() when using a 32bit compiler (and still get the 32bit control).

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
MsgRun() - strange problem
Posted: Wed Feb 22, 2006 05:24 PM

Thanks James.

Using cGetFile instead of cGetFile32 solved the problem.

Jeff

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)

Continue the discussion