URGENT HELP !!! xbrowse error

URGENT HELP !!! xbrowse error

Postby Silvio.Falconi » Mon May 29, 2017 11:30 am

I have a dialog

with buttons and one xbrowse as you can see here


Image


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

Image


Code: Select all  Expand view
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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6849
Joined: Thu Oct 18, 2012 7:17 pm

Re: URGENT HELP !!! xbrowse error

Postby ukoenig » Mon May 29, 2017 1: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: Select all  Expand view
´
// ----------- 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 :D
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: URGENT HELP !!! xbrowse error

Postby Silvio.Falconi » Mon May 29, 2017 2: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6849
Joined: Thu Oct 18, 2012 7:17 pm

Re: URGENT HELP !!! xbrowse error

Postby Silvio.Falconi » Mon May 29, 2017 3: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6849
Joined: Thu Oct 18, 2012 7:17 pm

Re: URGENT HELP !!! xbrowse error

Postby Otto » Mon May 29, 2017 7: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6068
Joined: Fri Oct 07, 2005 7:07 pm

Re: URGENT HELP !!! xbrowse error

Postby Silvio.Falconi » Mon May 29, 2017 9: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6849
Joined: Thu Oct 18, 2012 7:17 pm

Re: URGENT HELP !!! xbrowse error

Postby Otto » Tue May 30, 2017 7:02 am

Please see.

Image



Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6068
Joined: Fri Oct 07, 2005 7:07 pm

Re: URGENT HELP !!! xbrowse error

Postby Silvio.Falconi » Tue May 30, 2017 7: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 :

Image

but was too small
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6849
Joined: Thu Oct 18, 2012 7:17 pm

Re: URGENT HELP !!! xbrowse error

Postby nageswaragunupudi » Tue May 30, 2017 9: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
User avatar
nageswaragunupudi
 
Posts: 10308
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: URGENT HELP !!! xbrowse error

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6849
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 36 guests