by Garbi » Fri Mar 31, 2006 5:00 pm
Me da el siguiente error:
Error description: Error Objects/6 No Exp. Method: TDIALOG:SETCLIENT
Codigo fuente:
DEFINE DIALOG oDlg RESOURCE "HOJA" TITLE IIF( lNuevo,"AGREGAR" ,;
oemtoansi("MODIFICACION / CONSULTA Presupuesto n§ ")+alltrim(transform(vnumero,"999,999")) )
REDEFINE GET gvfecha Var vfecha ID 102 OF oDlg
REDEFINE say gvnombre Var vnombre ID 114 OF oDlg
REDEFINE say gvref Var vref ID 116 OF oDlg
REDEFINE BROWSE oBrwt ID 103 of oDlg
oDlg:SetClient( oBrwt )
oBrwT:bKeyChar = { | nKey, nFlags | (lineas(nkey),oBrwt:refresh(),ftotal(),gvtotal:refresh())}
ADD COLUMN to oBrwt DATA (ctemporal)->cantidad HEADER "Ctd" size 40 picture "99,999"
ADD COLUMN to oBrwt DATA (ctemporal)->concepto HEADER "Articulo" size 500
ADD COLUMN to oBrwt DATA (ctemporal)->unitario HEADER "Precio" size 100 Picture "9,999,999.99" RIGHT
ADD COLUMN to oBrwt DATA (ctemporal)->importe HEADER "Total" size 100 Picture "9,999,999.99" RIGHT
REDEFINE say gvtotal Var vtotal ID 105 OF oDlg picture("9,999,999.99")
REDEFINE get gvtdto Var vtdto ID 108 OF oDlg picture("999.99") valid ftotal()
REDEFINE say gvdto Var vdto ID 109 OF oDlg picture("9,999,999.99")
REDEFINE say gvbase Var vbase ID 110 OF oDlg picture("9,999,999.99")
REDEFINE say gvtiva Var vtiva ID 111 OF oDlg picture("999.99")
REDEFINE say gviva Var viva ID 112 OF oDlg picture("999,999.99")
REDEFINE say gvttotal Var vttotal ID 104 OF oDlg picture("9,999,999.99")
REDEFINE BTNBMP aBoton[1] ID 113 RESOURCE "DATOS" OF oDlg;
tooltip oemtoansi("Datos Adicionales");
action (datosadicionales(),gvnombre:refresh())
REDEFINE BTNBMP aBoton[2] ID 504 RESOURCE "sumar" OF oDlg;
tooltip oemtoansi("A¤adir Linea");
action (lineas(1),oBrwt:refresh())
REDEFINE BTNBMP aBoton[8] ID 107 RESOURCE "pgup" OF oDlg;
tooltip oemtoansi("Insertar Linea");
action (lineas(19),oBrwt:refresh())
REDEFINE BTNBMP aBoton[3] ID 505 RESOURCE "restar" OF oDlg;
tooltip oemtoansi("Borar Linea");
action (lineas(2),oBrwt:Refresh())
REDEFINE BTNBMP aBoton[4] ID 506 RESOURCE "cambIar" OF oDlg;
tooltip oemtoansi("Modificar Linea");
action (lineas(13),oBrwt:Refresh())
REDEFINE BTNBMP aBoton[7] ID 106 RESOURCE "TEXTO" OF oDlg;
tooltip oemtoansi("Nuevo");
action (lineas(14),oBrwt:Refresh())
REDEFINE BTNBMP aBoton[9] ID 117 RESOURCE "TARIFA" OF oDlg;
tooltip oemtoansi("Acceso Tarifa");
action (ftarifas(1),ftotal(),oBrwt:gotop(),oBrwt:Refresh())
* action (lineas(14),oBrwt:Refresh())
REDEFINE COMBOBOX getvfpago Var vfpago ID 115 items tfpago OF odlg
REDEFINE BTNBMP aBoton[5] ID 501 RESOURCE "ACEPTAR" OF oDlg ;
ACTION ( aVret:= ActAcepta( aVars ) , lSalva := aVret[1] ,;
IIF( lSalva , oDlg:End() , Obj(aVret[2]):SetFocus() ));
MESSAGE "Guardar cambios y salir del catalogo" ;
WHEN ( Acceso(oApp:aUsuarios,"PPTO", nActua ) )
REDEFINE BTNBMP aBoton[6] ID 502 RESOURCE "SALIR" OF oDlg ACTION (lSalva := falso, oDlg:End()) ;
MESSAGE "Salir del catalogo"
ACTIVATE DIALOG oDlg CENTER on init ftotal()