FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Need Ideas
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Need Ideas
Posted: Fri Nov 07, 2014 03:31 AM
I've been playing with this problem for 2 days. Here is a simple piece of code.

Stand alone it works fine. However, if I put it into my program, and call it with a button, it behaves incorrectly.
It does not stop at the Activate. Instead, it displays the browse window and immediately goes to the MsgInfo.

This is a simple reproduction of a failing segment in a larger routine. Please note the details after the code.

Also, all browses already established in the program work fine, and there is no duplication of the code here within any other part of the program.

Code (fw): Select all Collapse
function new8()

   local oWndT, oBrwT
                                  
   use c:\asw9s\eglskt shared

   DEFINE WINDOW oWndT

   @0,0 xbrowse oBrwT ;
      columns "KITCOD","KITYR" ;
      HEADERS "Kit Code", "Year" ;
      of oWndT ;
      DATASOURCE alias() ;
       ON DBLCLICK( oWndT:end() )
               
   oBrwT:CreateFromCode()
   oWnd:oClient:= oBrwT
                
   ACTIVATE WINDOW oWndT 
   msgInfo("Done")
RETURN nil


Using:

FWH 14.09
Harbour ( for MSFT )
Microsoft Visual Studio 2013

Thanks for any ideas you may have.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 169
Joined: Mon Feb 25, 2008 02:42 AM
Re: Need Ideas
Posted: Fri Nov 07, 2014 03:58 AM
Hi Tim..
Tyr this :

Code (fw): Select all Collapse
function new8()

   local oWndT, oBrwT, lExit := .f.
                                  
   use c:\asw9s\eglskt shared

   DEFINE WINDOW oWndT

   @0,0 xbrowse oBrwT ;
      columns "KITCOD","KITYR" ;
      HEADERS "Kit Code", "Year" ;
      of oWndT ;
      DATASOURCE alias() ;
       ON DBLCLICK( lExit := .t., oWndT:end() )
               
   oBrwT:CreateFromCode()
   oWnd:oClient:= oBrwT
                
   ACTIVATE WINDOW oWndT  valid lExit
   msgInfo("Done")
RETURN nil
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Need Ideas
Posted: Fri Nov 07, 2014 04:35 AM

Tim,

Is your main window MDI ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Need Ideas
Posted: Fri Nov 07, 2014 04:46 AM

No, SDI. My clients had continuous problems with MDI..

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Need Ideas
Posted: Fri Nov 07, 2014 05:59 AM

Tim,

ok.

windows are not modal, that means that they don't stop the execution flow.

If you need to stop there, then we may need to use a loop there until a certain condition is matched.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: Need Ideas
Posted: Fri Nov 07, 2014 07:03 AM

Tim,

Use Dialog instead.

2 cents.

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Need Ideas
Posted: Fri Nov 07, 2014 08:13 AM

Frances,

Yes, thats the best solution :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
Re: Need Ideas
Posted: Fri Nov 07, 2014 12:43 PM

Timm,

If you need to use a Window, please check StopUntill at source\rpreview.prg.

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Need Ideas
Posted: Fri Nov 07, 2014 04:23 PM

Once Antonio asked that question I immediately tried a Dialog and it resolved the problem.

Sometimes we just look at something far too long and the answers hide.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit

Continue the discussion