- Code: Select all Expand view RUN
- /*************************************************************************************/
// FUNCION AGREGAR CHOFERES Ó MODIFICAR
// utiliza la clase database
// Setiembre de 2001
/*************************************************************************************/
#include "Fivewin.ch"
#include "splitter.ch"
#include "inkey.ch"
// * * *
// FUNCION : Brwven() -> NIL
// DESCRIPCION: Realiza un Browse de la base de datos CHOFER.Dbf,
// Permitiendo: Borrar o Modificar el registro actual,
// Dar de alta Nuevo o Buscar registro.
// * * *
FUNCTION Brwcho
LOCAL oLbx
LOCAL oDlg, oSplit := Array( 2 )
LOCAL oRadioButtons
LOCAL nOrden := 1
LOCAL onbut := Array( 6 )
LOCAL oCho
LOCAL paso := "no paso"
LOCAL surge, oRadiobutton, titu
IF !PASAJE( "chofer" )
RETURN NIL
ENDIF
DATABASE oCho
oCho:setorder( 2 )
oCho:gotop()
oCho:beof := {|| nil }
define icon surge resource "icomega"
DEFINE DIALOG oDlg RESOURCE "DIALOG_2"
oDlg:cCaption := "Vendedores"
REDEFINE SPLITTER oSplit[ 1 ] id 110 COLOR rgb( 234, 234, 234 ) of odlg _3DLOOK
REDEFINE SPLITTER oSplit[ 2 ] id 111 COLOR rgb( 234, 234, 234 ) of odlg _3DLOOK
REDEFINE XBROWSE oLbx ID 101 DATASOURCE oCho ;
columns "codigo", "nombre","dni","camion","patente","modelo", "tipo", "te","domicilio","localidad","provincia" ;
HEADERS "CODIGO", "APELLIDO", "DOCUMENTO", "CAMION", "PATENTE", ;
"MODELO", "TIPO", "TELEFONO", "DOMICILIO", "LOCALIDAD", "PROVINCIA";
OF oDlg ON DBLCLICK ( FCHOFER( oLbx, .f.,oCho),oLbx:refresh())
olbx:setfocus()
WITH OBJECT oLbx
:nMarqueeStyle := 4
:nColDividerStyle := LINESTYLE_BLACK
:nStretchCol := STRETCHCOL_LAST
:lColDividerComplete := .F.
:l2010 := .T.
:lAllowColHiding := .F.
:lIncrFilter := .T.
:lSeekWild := .F.
:bKeyDown := {| nKey | If( nKey == K_ENTER, ( FCHOFER( oLbx, .f.,oCho),oDlg:end()), ) }
:nRowDividerStyle :=2 // Row divider style: 0 No lines 1 Black line 2 Dark gray line 3 Raised 4 Inset 5 Fore Color 6 Light gray
:nColDividerStyle :=2
END WITH
REDEFINE RADIO oRadioButton VAR nOrden id 108, 107;
OF oDlg ON CHANGE Orden( nOrden, oLbx, oCho ) // Al detectar un cambio se ejecutar la funci¢n
REDEFINE BTNBMP oNbut[ 1 ] id 102 of oDlg resource "btnagregar", "btnagrega1" ACTION FCHOFER( oLbx, .T., oCho ) NOBORDER
REDEFINE BTNBMP oNbut[ 2 ] id 103 OF oDlg resource "btncambio", "btncambi1" ACTION FCHOFER( oLbx, .F., oCho ) NOBORDER
REDEFINE BTNBMP oNbut[ 3 ] id 104 OF oDlg resource "btnbusca", "btnbusc1" ACTION Buscar( oLbx, nOrden, oCho, paso ) NOBORDER
REDEFINE BTNBMP oNbut[ 4 ] id 105 of oDlg resource "btnborra", "btnborr1" ACTION DelClient( oLbx, oCho, ( oCho:cAlias )->nombre ) NOBORDER
REDEFINE BTNBMP oNbut[ 5 ] id 106 OF oDlg resource "btnimpri", "btnimpr1" ACTION oDlg:End() NOBORDER
REDEFINE BTNBMP oNbut[ 6 ] id 109 OF oDlg resource "btnsalir", "btnsali1" ;
ACTION cierroalias( oCho:calias), oDlg:End() NOBORDER
ACTIVATE DIALOG oDlg CENTER NOWAIT valid( olbx:end(), sysrefresh(), cierroalias( oCho:calias ), .T. )
RETURN( NIL )
Al hacer doble click se abre un diálogo para cargar o modificar datos
Lo haces una vez abre el diálogo, lo cerras y
lo abris nuevamente y ok pero a la tercera indefectiblemente da este error
- Code: Select all Expand view RUN
- Application
===========
Path and name: K:\fivexhar2\fivehar.exe (32 bits)
Size: 6,572,544 bytes
Compiler version: Harbour 3.2.0dev (r1806032230)
FiveWin version: FWH 17.09
C compiler version: Borland/Embarcadero C++ 7.3 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 12 secs
Error occurred at: 23/10/2019, 22:49:57
Error description: Error DBCMD/2001 Area de trabajo no usada: DBGOTO
Stack Calls
===========
Called from: => DBGOTO( 0 )
Called from: .\source\classes\DATABASE.PRG => TDATABASE:TD_SAVEREC( 1973 )
Called from: .\source\classes\DATABASE.PRG => TDATABASE:SKIPPER( 1558 )
Called from: .\source\classes\DATABASE.PRG => (b)TDATABASE_SETXBROWSE( 1602 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE( 503 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:SKIP( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 1946 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1746 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1697 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 10242 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3348 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 436 )
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 23 )
Called from: => ORDKEYCOUNT( 0 )
Called from: .\source\classes\DATABASE.PRG => (b)TDATABASE( 212 )
Called from: .\source\classes\DATABASE.PRG => TDATABASE:KEYCOUNT( 0 )
Called from: .\source\classes\DATABASE.PRG => (b)TDATABASE_SETXBROWSE( 1607 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE( 497 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:KEYCOUNT( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:REFRESH( 1650 )
Called from: megacho.prg => (b)BRWCHO( 74 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:LDBLCLICK( 1997 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:LDBLCLICK( 1744 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LDBLCLICK( 4709 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1731 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 10242 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3348 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1037 )
Called from: origen.prg => ORIGEN( 260 )
System; etc:etc
Encontre un posteo similar del año 2010 bajo el título Errores esporádicos con XBROWSE
Pero no me lo soluciona.
Que es lo que falta o sobra, ya que la base se cierra cuando cierro el diálogo o uso la opción salir del diálogo
Fwh17.09 y harbour3.2
Luis