FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour URGENT HELP !!! xbrowse error
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
URGENT HELP !!! xbrowse error
Posted: Mon May 29, 2017 11:30 AM
I have a dialog

with buttons and one xbrowse as you can see here





when I press the bordeaux button ( on bottom at left ) I can esc from this dialog

If I made this for ten /twenty time it not crash

When I click on X and then I click on the bordeau button the dialog crash making this error




Code (fw): Select all Collapse
Application
===========
   Path and name: C:\Work\Prg\Comanda\Com@nda.Exe (32 bits)
   Size: 7,016,960 bytes
   Compiler version: Harbour 3.2.0dev (r1406271520)
   FiveWin  version: FWH 17.02
   C compiler version: Borland C++ 5.8.2 (32-bit)
   Windows version: 6.1, Build 7600 

   Time from start: 0 hours 1 mins 10 secs 
   Error occurred at: 29-05-2017, 13:14:29
   Error description: Error DBCMD/2001  Workarea non in use: __DBSKIPPER

Stack Calls
===========
   Called from:  => __DBSKIPPER( 0 )
   Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE_SETRDD( 4955 )
   Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE( 494 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:SKIP( 0 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 1922 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1724 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1697 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 14414 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3325 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
   Called from: source\PCassa.prg => CAPTURADEPRODUCTOS( 626 )
   Called from: source\PCassa.prg => CASSA( 52 )
   Called from: source\main.prg => (b)TAPPLICATION_BUILDBTNBAR( 741 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 665 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 901 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1721 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 1843 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3325 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1036 )
   Called from: source\main.prg => TAPPLICATION:ACTIVATE( 419 )
   Called from: source\main.prg => MAIN( 61 )



the prg
STATIC FUNCTION cassa( aDatosMesa )

LOCAL lSalida :=.f.

DEFINE DIALOG oDlgMesas ;
TITLE cTitle ;
SIZE nWidth, nHeight


....


@ 325,5 SBUTTON aBtnsConsu[3] OF oDlgMesas SIZE 48, 30 PIXEL ;
COLORS CLR_WHITE, RGB(162, 0, 37), CLR_WHITE;
PROMPT "ESCI" CRYSTAL NOBOX ACTION ( lSalida:= TRUE, oDlgMesas:End() ) FONT oFntConsum




....


@ 20,300 XBROWSE oBrwConsu SIZE 185,165 PIXEL OF oDlgMesas ;
DATASOURCE "CO" ;
COLUMNS "Cantidad", "Desc", "Precio", "Importe" ;
HEADERS "Qta", "Descrizione", "Prezzo", "Importo" ;
COLSIZES 30, 170, 60, 60 ;
PICTURES "999,999", nil, "999.99", "999.99" ;
NOBORDER ;
FONT oFntBrow STYLE 2015


....



ACTIVATE DIALOG oDlgMesas ;
ON INIT ( SetTotals(cScoNumDoc), oBrwConsu:SetFocus() ) ;
ON PAINT ( aRct := GetClientRect( oDlgMesas:hWnd ), ;
GradColor(oDlgMesas:hDC, aRct, CLR_WHITE, LightColor(100, RGB( 216, 230, 246 )) ));
CENTERED VALID (DestroyBtns( aBtnScroll ), ;
DestroyBtns( aBtnsProdu ), ;
nPageLines:= 0, ;
nElemenLines:= 12,;
CO->( ORDSCOPE( 0, NIL ) ), ;
CO->( ORDSCOPE( 1, NIL ) ),;
DbCloseAll(),;
oDlgMesas := NIL,;
oBrwConsu := NIL, lSalida )

RETURN NIL
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: URGENT HELP !!! xbrowse error
Posted: Mon May 29, 2017 01:15 PM
Silvio,

in some critical situations, I DISABLE the dialog X - button.
It forces the user to close a dialog with the defined button.

You errormessage shows, that You try to set the focus on a closed database.
< Workarea non in use >

You can check it with < BROWSE() > after the activate dialog

The DISABLE X - function if needed

Code (fw): Select all Collapse
´
// ----------- X - EXIT-Button DISABLED ----------

FUNCTION DisableX(oWin, lDisable) 
LOCAL hMenu  := 0 
LOCAL nCount := 0 
    
IF lDisable 
   hMenu  = GetSystemMenu(oWin:hWnd, .F.) 
   nCount = GetMItemCount(hMenu) 
   RemoveMenu(hMenu, nCount - 1, nOR( 1024, 2) ) 
   RemoveMenu(hMenu, nCount - 2, nOR( 1024, 2) ) 
   DrawMenuBar( oWin:hWnd ) 
ELSE 
   GetSystemMenu( oWin:hWnd, .T. ) 
   DrawMenuBar( oWin:hWnd ) 
ENDIF 

RETURN nil


regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: URGENT HELP !!! xbrowse error
Posted: Mon May 29, 2017 02:57 PM

I have all these problems when I used Harbour
On xHarbour never had these problems

Now I tried also with

ACTIVATE DIALOG oDlgMesas ;
VALID (DbCloseAll(),;
lSalida)

make the same error ...

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: URGENT HELP !!! xbrowse error
Posted: Mon May 29, 2017 03:04 PM

with

ACTIVATE DIALOG oDlgMesas ;
on init DisableX(oDlgMesas, .t.) ;
VALID (DbCloseAll(),;
lSalida)

seem run ok thanks Uwe but I not understood why ...

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: URGENT HELP !!! xbrowse error
Posted: Mon May 29, 2017 07:06 PM

Hello Silvio,
are you left handed. For right handed people you cover the information in xbrowse with your hand.
The screen is very nice.
Best regards,
Otto

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: URGENT HELP !!! xbrowse error
Posted: Mon May 29, 2017 09:58 PM

Sorry i don't unerstood what U wrote

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: URGENT HELP !!! xbrowse error
Posted: Tue May 30, 2017 07:02 AM
Please see.





Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: URGENT HELP !!! xbrowse error
Posted: Tue May 30, 2017 07:30 AM
aaaah ok..

but the part with the green buttons are the product and the other party are buttons of Category

before the dialog was this :



but was too small
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: URGENT HELP !!! xbrowse error
Posted: Tue May 30, 2017 09:28 AM

Closing databases inside valid clause can give such problems.
For a fraction of a second, dbf is closed and xbrowse is still there.
Better to close dbf after dialog is closed

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: URGENT HELP !!! xbrowse error
Posted: Tue May 30, 2017 10:16 AM

thanks mr Rao can you make a sample test with valid clausole ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion