Need Ideas

Need Ideas

Postby TimStone » Fri Nov 07, 2014 3: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: Select all  Expand view

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
User avatar
TimStone
 
Posts: 2912
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Need Ideas

Postby fafi » Fri Nov 07, 2014 3:58 am

Hi Tim..
Tyr this :

Code: Select all  Expand view

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

 
User avatar
fafi
 
Posts: 169
Joined: Mon Feb 25, 2008 2:42 am

Re: Need Ideas

Postby Antonio Linares » Fri Nov 07, 2014 4:35 am

Tim,

Is your main window MDI ?
regards, saludos

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

Re: Need Ideas

Postby TimStone » Fri Nov 07, 2014 4: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
User avatar
TimStone
 
Posts: 2912
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Need Ideas

Postby Antonio Linares » Fri Nov 07, 2014 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41476
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Need Ideas

Postby fraxzi » Fri Nov 07, 2014 7: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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: Need Ideas

Postby Antonio Linares » Fri Nov 07, 2014 8:13 am

Frances,

Yes, thats the best solution :-)
regards, saludos

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

Re: Need Ideas

Postby MOISES » 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
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: Need Ideas

Postby TimStone » Fri Nov 07, 2014 4: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
User avatar
TimStone
 
Posts: 2912
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 68 guests