Estoy teniendo problema con un xBrowse, La primera vez entra perfecto, Salgo y vuelvo a entrar y me sale el siguiente error:
Nom defined Id No: 148
Called from ..\source\classes\CONTROL.PRG=> TCONTROL:INITIATE(386)
Called from ..\source\classes\TGEY.PRG=> TGET:INITIATE(594)
El dialogo es creado desde un recurso de una DLL. Ya lo invente el ID 148 con texto en blanco. Entra 2 veces y a la tercera me sale Nom defined Id No: 178
Aqui el codigo
Code: Select all
DEFINE DIALOG oDlg1 RESOURCE "MUE_TRAB" Title 'MUESTRA TRABAJOS'
REDEFINE RADIO nTodCen ID 101,102 OF oDlg1 UPDATE
REDEFINE SAY oSector VAR cSector ID 201 OF oDlg1 UPDATE
REDEFINE RADIO nPenProEje ID 103,104,105 OF oDlg1 UPDATE
REDEFINE BUTTON oBtn ID 106 OF oDlg1 ACTION ( Cambia(oDBF),oBrw1:GoTop(),oBrw1:Update(),oBrw1:SetFocus() )
oBrw1 := TXBrowse():New( oDlg1 )
oBrw1:nMarqueeStyle:=MARQSTYLE_HIGHLROW
oBrw1:lHScroll:=.F.
oBrw1:nColDividerStyle:= LINESTYLE_INSET
oBrw1:nRowDividerStyle:= LINESTYLE_BLACK
oBrw1:bLDblClick:={ || PideDatos( .F.,6,"CONSULTA") }
oCol := oBrw1:AddCol()
oCol:bStrData := { || TRAB->FECHA}
oCol:nDataStrAlign := AL_CENTER
oCol:cHeader := "FECHA"
oCol:nWidth:=65
oCol:bLClickHeader:= {|| CAMBIAORDEN("1") }
oCol := oBrw1:AddCol()
oCol:bStrData := { || LEFT(TRAB->HORA,5)}
oCol:nDataStrAlign := AL_CENTER
oCol:cHeader := "HORA"
oCol:nWidth:=34
oCol:bLClickHeader:= {|| CAMBIAORDEN("1") }
oCol := oBrw1:AddCol()
oCol:bStrData := { || OEMTOANSI(TRAB->SOLICITANT)}
oCol:cHeader := "SOLICITANTE"
oCol:nHeadStrAlign := AL_CENTER
oCol:nWidth:=210
oCol:bLClickHeader:= {|| CAMBIAORDEN("2") }
oCol := oBrw1:AddCol()
oCol:bStrData := { || TRAB->PARASECTOR}
oCol:cHeader := "PARA SECTOR"
oCol:nWidth:=200
oCol:nHeadStrAlign := AL_CENTER
oCol:bLClickHeader:= {|| CAMBIAORDEN("3") }
oCol := oBrw1:AddCol()
oCol:bStrData := { || iF(TRAB->EST="E",TRAB->FEC_EJE,Str(DATE()-TRAB->FECHA,2)+" DIAS")}
oCol:cHeader := "ANT/EJE"
oCol:nWidth:=65
oCol:nHeadStrAlign := AL_CENTER
oCol := oBrw1:AddCol()
oCol:bStrData := { || OEMTOANSI(TRAB->RESPONSABL)}
oCol:cHeader := "LO REALIZA"
oCol:nWidth:=175
oCol:nHeadStrAlign := AL_CENTER
oCol:bLClickHeader:= {|| CAMBIAORDEN("4") }
oBrw1:CreateFromResource(107)
oBrw1:bChange:={|| (oTrab:Refresh())}
REDEFINE SAY oTrab VAR OemToAnsi(TRAB->TRABAJO) MEMO ID 108 OF oDlg1 UPDATE
oDlg1:bStart:= { || (oDlg1:aControls[8]:SetFocus()) }
oBrw1:bKeyDown := {|nKey| iif( nKey >=96 .AND. nKey <=105, nKey-= 48, ), iif( nKey == VK_ESCAPE, (oDlg1:End()),Nil ), ;
iif( nKey == VK_RETURN,(PideDatos( .F.,6,"CONSULTA"),oBrw1:Refresh(), oBrw1:SetFocus()), ),iif( nKey==VK_F3, oDlg1:End(), ),iif( nKey == VK_F7, ( Accion(5,oBrw1) ), ),;
iif( nKey == VK_BACK , ( xClave:= SUBSTR( xClave,1,LEN( xClave )-1 ), iif(EMPTY(xClave),oBrw1:GoTop(),dBSeek( xClave )), oBrw1:Refresh(), oVar1:Refresh() ), ), ;
iif( nKey>=32 .AND. nKey<=128, ( dBSeek( xClave+UPPER(CHR(nKey) ) ),iif( !EOF(), xClave+=UPPER(CHR(nKey)), ),dBSeek(xClave),oBrw1:Refresh(),oVar1:Refresh() ),)}
@ 4, 260 GET oVar1 VAR xClave SIZE 40,8 PIXEL OF oDlg1 READONLY UPDATE
ACTIVATE DIALOG oDlg1 CENTERED ON INIT ( Botones(),oBrw1:GoBottom(),oBrw1:Update())
Saludos
Adhemar