Dialog NOWAIT lost focus at activation!

Postby JC » Wed Aug 20, 2008 7:04 pm

Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby James Bott » Wed Aug 20, 2008 7:24 pm

Julio,

I downloaded it twice and both times I am getting an "invalid or corrupted zip file" message. Please create a new zip and just email me a copy.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby JC » Wed Aug 20, 2008 7:26 pm

James Bott wrote:Julio,

I downloaded it twice and both times I am getting an "invalid or corrupted zip file" message. Please create a new zip and just email me a copy.

James


Here James: http://rapidshare.com/files/138816359/nonmodal.zip.html
I have send to your email too!
And thank you very much for you help!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby Alfredo Arteaga » Wed Aug 20, 2008 7:35 pm

Maybe this optión...

Code: Select all  Expand view  RUN
#Include "FiveWin.Ch"

FUNCTION Main()
   LOCAL oWnd, lInit:=.T., oDlg, oSay, cSay

   cSay:="Loading, please wait..."

   DEFINE DIALOG oDlg FROM 0, 0 TO 5,40
   @ 1, 1 SAY oSay PROMPT cSay CENTERED
   ACTIVATE DIALOG oDlg NOWAIT CENTERED
   SysRefresh()
   WaitSeconds(2)

   DEFINE WINDOW oWnd
   ACTIVATE WINDOW oWnd MAXIMIZED;
      ON PAINT Paint_Window(oDlg,@lInit) ;
      ON INIT  Init_Window(oSay,@cSay,oDlg)

RETURN (NIL)

STAT FUNC Init_Window(oSay,cSay,oDlg)
   cSay:="Init process, wait..."
   oSay:Refresh()
   WaitSeconds(3)
   cSay:="Ready!"
   oSay:Refresh()
   MsgBeep()
   WaitSeconds(1)
   oDlg:End()
RETURN (NIL)

STAT FUNC Paint_Window(oDlg,lInit)

   IF lInit
      oDlg:SetFocus()
      SysRefresh()
      CursorWait()
      lInit:=.F.
   ENDIF

RETURN (NIL)

User avatar
Alfredo Arteaga
 
Posts: 326
Joined: Sun Oct 09, 2005 5:22 pm
Location: Mexico

Postby James Bott » Wed Aug 20, 2008 7:52 pm

Julio,

Ok, I tried your example, but I still don't know what you are trying to do and/or what problem you are having.

Is the program you sent showing a problem? If so, what is the problem?

Or, is it working the way you want.

I think you should also rethink having so many windows popping up. A better design is to put messages in the same window where they apply. You can also either use the hourglass cursor for short waits (up to about 5 seconds) or a progress bar for longer waits when you can calculate the total wait time or an animation if you don't know the total wait time.

Did you try my example showing the updated message on the main window?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby James Bott » Wed Aug 20, 2008 8:08 pm

Julio,

Why do have the MS-DOS window open. Do your users always have a DOS app running, or is it just a problem with the DOS window that you noticed because you have one open when programming?

Most users never run DOS apps anymore, so if there is a problem with a DOS window I don't think your users will ever see it.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby James Bott » Wed Aug 20, 2008 8:21 pm

Julio,

One problem I see in your code is that you are passing an existing oDlg object, then redefining it as a new dialog. You can't do this.

Code: Select all  Expand view  RUN
FUNCTION waitDlg( oDlg, oWnd )
   LOCAL oSay
   DEFINE DIALOG oDlg OF oWnd


You need to define a new LOCAL oDlg2.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby James Bott » Wed Aug 20, 2008 8:39 pm

Julio,

I see that you are opening a window then a dialog, then another dialog. Why do you need two dialogs? Can't you just close the first dialog when you open the second one?

Are you updating a customer browse in the main window, or in the first dialog?

I think a redesign of the interface would probably be a better solution.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby JC » Thu Aug 21, 2008 11:25 am

James Bott wrote:Julio,

I see that you are opening a window then a dialog, then another dialog. Why do you need two dialogs? Can't you just close the first dialog when you open the second one?

Are you updating a customer browse in the main window, or in the first dialog?

I think a redesign of the interface would probably be a better solution.

James


James, I see your tips I think above the redesign of this problem. The second dialog is just for a message displaying when the process at first dialog is executing!
When I get the better solution, you will know!
Thank you very much for all!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby James Bott » Thu Aug 21, 2008 12:13 pm

Julio,

Good. I highly recommend getting a copy of the book, "About Face 2.0: The Essentials of Interaction Design"

http://www.amazon.com/About-Face-2-0-Essentials-Interaction/dp/0764526413/ref=sip_rech_dp_10

You can get a used copy for less than US$5.

There is a newer version but it discusses more about web design, so I recommend getting the 2.0 version.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby JC » Thu Aug 21, 2008 12:18 pm

James Bott wrote:Julio,

Good. I highly recommend getting a copy of the book, "About Face 2.0: The Essentials of Interaction Design"

http://www.amazon.com/About-Face-2-0-Essentials-Interaction/dp/0764526413/ref=sip_rech_dp_10

You can get a used copy for less than US$5.

There is a newer version but it discusses more about web design, so I recommend getting the 2.0 version.

James

James, this is very important! I take care about this! Thank again for your help! Very soon, I will show you my solution!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], SantaCroya and 45 guests