Muy buen dia, necesito ayuda urgente.
Desde un Combobox, segun dato seleccionado, voy a cargar una arreglo para un XBROWSE.
El problema que se me presenta es el Siguiente:
Mientras EXISTAN DATOS, para cargar el arreglo en XBROWSE, este se muestra muy bien el detalle.
Pero cuando NO encuentro datos, para cargar el arreglo, al Presionar el Boton Salir del Dialog en, arroja un error en ACTIVATE MARCADO.
REDEFINE BTNBMP ID 105 Resource "#8004" OF oDlg ;
ACTION (Cierra(),oDlg:END())
ACTIVATE DIALOG oDlg CENTERED <------- Aqui acusa error al salir
Dejo el Codigo del programa y del error:
Desde ya Muchas gracias.
Atte.
Antonio
Code: Select all
REDEFINE SAY oSay2 ID 120 PROMPT "TOTAL PACIENTES: "+str(total_pac,3) OF oDlg FONT oFont2 COLORS rgb(39, 0, 64)
REDEFINE COMBOBOX oCod_pro1 VAR nCod_pro1 ITEMS ArrTranspose( aProfe )[ 2 ] ID 102 OF oDlg COLORS nRGB(9, 11, 10), nRGB(73, 250, 202);
ON CHANGE (cCod_pro1:=ArrTranspose( aProfe )[ 1 ][oCod_pro1:nAt],[b]Carga_paci(cCod_pro1)[/b],oPaci:Refresh(),oSay2:Refresh())
// Voy a Cargar Xbrowse , Refresco el Browse
REDEFINE XBROWSE oPaci ID 104 OF oDlg ;
COLUMNS 1,2,3,4,5,6,7;
HEADERS "Nro. ","Nombre del Paciente" ,"Folio Caja","T. Pago","Valor ","Digita","Hr. Digi";
COLSIZES 40, 350, 80, 80,70,80,80 ;
FONT oFont1;
ARRAY aPacientes ;
FOOTERS LINES CELL
oPaci:bClrStd := {|| { nRGB( 0, 0, 0), nRGB(255,248,220) } }
oPaci:bClrSelFocus := {|| { nRGB( 0, 0, 0), nRGB(137, 247, 33) } }
oPaci:bClrHeader := {|| { CLR_BLUE, nRGB( 245, 245, 245 ) } }
oPaci:bClrSel := {|| { nRGB(000,000,000), nRGB(128,255,128) } }
oPaci:bClrSelFocus := {|| { nRGB( 0, 0, 0), nRGB(128,255,128) } }
oPaci:bClrStd := {|| { nRGB(000,000,000), nRGB(255,255,200) } }
oPaci:nStretchCol := STRETCHCOL_WIDEST
oCol := oPaci:AddCol()
oCol:AddResource("#8006")
oCol:AddResource("#8007")
oCol:cHeader = "Estado"
oCol:bBmpData := { || if(aPacientes[oPaci:nArrayAt,8]=="S",1,2)}
REDEFINE BTNBMP ID 105 Resource "#8004" OF oDlg ; <---- Al dar Boton Salir
ACTION (Cierra(),oDlg:END())
ACTIVATE DIALOG oDlg CENTERED <---- Aqui Marca el Error
Return Nil
Static Function Carga_paci(cCod_pro1)
asize( aPacientes, 0 )
If Len(cCod_pro1)=0
MsgStop("No ha Seleccionado Profesional Medico")
Return
Endif
carchi:='PACI'+trim(cCod_pro1)
If !file('&carchi..dbf')
MsgStop("MEDICO SELECCIONADO NO TIENE INGRESOS DE PACIENTES")
Return
Endif
Sele 2
Use &carchi Shared
If !file('&carchi..ntx')
Inde on Cod_pro+dtos(ctod(fec_ate))+Str(Cor_pac,4) to &carchi
Endif
Set Inde to &carchi
//seek cCod_pro1+dtos(date())
DbGotop()
If eof()
MsgStop("MEDICO SELECCIONADO NO TIENE PACIENTES EN ESPERA")
DbClosearea()
Return
Endif
Stor 0 to total_pac
Do While !Eof()
// If (ctod(fec_ate)=Fecha_hoy)
AADD( aPacientes,{ b->Cor_pac,b->Nom_pac,b->Fol_caj,b->Tip_pag,b->Val_bon,b->Cod_dig,b->Hor_dig,b->Con_pac})
total_pac=total_pac+1
// Endif
DbSkip()
Enddo
DbClosearea()
oPaci:SetArray( aPacientes )
oPaci:GoTop()
oPaci:Refresh()
Return oPaci
Code: Select all
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 12 secs
Error occurred at: 15/11/2018, 10:38:42
Error description: Error BASE/1072 Argument error: <>
Args:
[ 1] = N 1
[ 2] = C
Stack Calls
===========
Called from: .\source\classes\TGET.PRG => TGET:LOSTFOCUS( 1667 )
Called from: .\source\classes\CONTROL.PRG => TGET:KILLFOCUS( 1081 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1694 )
Called from: .\source\classes\TGET.PRG => TGET:HANDLEEVENT( 795 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3348 )
Called from: => SETFOCUS( 0 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONDOWN( 849 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1718 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 1873 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3348 )
Called from: => DIALOGBOX( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
Called from: .\Consulta.PRG => CONSU_PACI( 82 )
Called from: .\MenuCon.PRG => (b)MAIN( 46 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 684 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 924 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1721 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 1873 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3348 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1037 )
Called from: .\MenuCon.PRG => MAIN( 58 )
System
======
CPU type: Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz 2594 Mhz
Hardware memory: 8085 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Windows total applications running: 6
1 ,
2 , C:\Util\Boxpaci\MenuCon.exe
3 , C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.17134.345_none_40ff7c
4 , C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.17134.345_none_42efd13
5 DDE Server Window, C:\WINDOWS\System32\OLE32.DLL
6 G, C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.17134.345_none_73dac4159f74062
Variables in use
================
Procedure Type Value
==========================
TGET:LOSTFOCUS
Param 1: O Class: ERROR
TGET:KILLFOCUS
Param 1: N 4459202
Local 1: N 1
Local 2: C ""
Local 3: U
Local 4: U
TCONTROL:HANDLEEVENT
Param 1: N 4459202
Local 1: U
TGET:HANDLEEVENT
Param 1: N 8
Param 2: N 4459202
Param 3: N 0
Local 1: U
_FWH
Param 1: N 8
Param 2: N 4459202
Param 3: N 0
Local 1: U
SETFOCUS
Param 1: N 0
Param 2: N 8
Param 3: N 4459202
Param 4: N 0
Param 5: N 10
Local 1: O Class: TGET
TBTNBMP:LBUTTONDOWN
Param 1: N 4459202
TCONTROL:HANDLEEVENT
Param 1: N 17
Param 2: N 91
Param 3: N 1
Param 4: L .F.
TBTNBMP:HANDLEEVENT
Param 1: N 513
Param 2: N 1
Param 3: N 1114203
Local 1: U
_FWH
Param 1: N 513
Param 2: N 1
Param 3: N 1114203
DIALOGBOX
Param 1: N 1114203
Param 2: N 513
Param 3: N 1
Param 4: N 1114203
Param 5: N 29
Local 1: O Class: TBTNBMP
TDIALOG:ACTIVATE
Param 1: N 4194304
Param 2: C "#1004"
Param 3: N 5377348
Param 4: O Class: TDIALOG
CONSU_PACI
Param 1: U
Param 2: U
Param 3: U
Param 4: L .T.
Param 5: U
Param 6: L .T.
Param 7: U
Param 8: U
Param 9: U
Param 10: U
Param 11: U
Local 1: N 5377348
Local 2: S
Local 3: O Class: TDIALOG
(b)MAIN
Local 1: O Class: TFONT
Local 2: O Class: TFONT
Local 3: O Class: TSAY
Local 4: O Class: TFONT
Local 5: O Class: TSAY
Local 6: O Class: TDIALOG
Local 7: O Class: TSAY
TBTNBMP:CLICK
Param 1: O Class: TBTNBMP
TBTNBMP:LBUTTONUP
TCONTROL:HANDLEEVENT
Param 1: N 15
Param 2: N 27
Param 3: N 0
Local 1: L .T.
Local 2: N 0
Local 3: S
TBTNBMP:HANDLEEVENT
Param 1: N 514
Param 2: N 0
Param 3: N 983067
Local 1: U
_FWH
Param 1: N 514
Param 2: N 0
Param 3: N 983067
WINRUN
Param 1: N 983067
Param 2: N 514
Param 3: N 0
Param 4: N 983067
Param 5: N 3
Local 1: O Class: TBTNBMP
TWINDOW:ACTIVATE
Param 1: N 5377348
MAIN
Param 1: C "MAXIMIZED"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: U
Param 7: U
Param 8: B {|| ... }
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: B {|| ... }
Param 18: U
Param 19: U
Param 20: L .F.
Local 1: O Class: TWINDOW
Local 2: U
Local 3: U
Linked RDDs
===========
DBF
DBFFPT
DBFBLOB
DBFNTX
DataBases in use
================
Classes in use:
===============
1 ERROR
2 HBCLASS
3 HBOBJECT
4 TCURSOR
5 TFONT
6 TWINDOW
7 TDIALOG
8 TBRUSH
9 TCONTROL
10 TBITMAP
11 TSAY
12 TGET
13 GET
14 TCLIPGET
15 TBUTTON
16 TRECT
17 TREG32
18 TBAR
19 TBTNBMP
20 TMSGBAR
21 TCOMBOBOX
22 TXBROWSE
23 TXBRWCOLUMN
24 TSCROLLBAR
25 TCLIPBOARD
26 TSTRUCT
Memory Analysis
===============
384 Static variables
Dynamic memory consume:
Actual Value: 1507328 bytes
Highest Value: 1507328 bytes