En este código
- Code: Select all Expand view
- aCampos := {oRsClien:Fields( 0):NAME, oRsClien:Fields( 1):NAME,;
oRsClien:Fields( 2):NAME, oRsClien:Fields( 3):NAME,;
oRsClien:Fields( 4):NAME, oRsClien:Fields( 5):NAME ,;
oRsClien:Fields( 6):NAME, oRsClien:Fields( 7):NAME,;
oRsClien:Fields( 8):NAME, oRsClien:Fields( 9):NAME,;
oRsClien:Fields(10):NAME, oRsClien:Fields(11):NAME,;
oRsClien:Fields(12):NAME, oRsClien:Fields(13):NAME }
oBrw := TXBrowse():New( oWChild )
oBrw:SetAdo( oRsClien, .T.,.T.,aCampos)
WITH OBJECT oBrw
:lColDividerComplete := .t.
:nMarqueeStyle := 3
:nColDividerStyle := 1
:nHeaderLines := 2
:lFooter := .t.
:nStretchCol := 1
:bClrSelFocus := { || { CLR_BLACK, aSelGrad } }
:bClrRowFocus := { || { CLR_BLACK, aRowGrad } }
:bClrStd := {|| IIF(oRsClien:AbsolutePosition % 2 == 0,{ CLR_BLACK, RGB( 224, 236, 255 ) }, { CLR_BLACK, RGB( 189, 211, 253 ) } )}
:CreateFromCode()
:Adjust()
:l2007 := .t.
END
For nFor := 1 to len( oBrw:aCols )
oCol := oBrw:aCols[ nFor ]
oCol:nEditType := 0
If oCol:Value = NIL
oCol:cEditPicture := " "
EndIf
oCol:blDClickData := {|| CtrCliente(ID_MOD,oWChild,oBrw),oBrw:Refresh() }
next
oBrw:aCols[13]:SetCheck ({"CHECKON","CHECKOFF"} )
oBrw:aCols[14]:SetCheck ({"CHECKON","CHECKOFF"} )
oWChild:oClient := oBrw
Se produce el error que os pongo a continuación, cuando intento visualizar las columnas 13 y 14 que, como veis, son dos casillas de verificación.
No preguntéis por los bitmaps, están en los recursos. La tabla tiene los campos 13 y 14 como verdadero/falso (es una base de datos de Acces, con diferentes tablas)
El módulo está trabajado con ADO puro y duro, ya que le escribí hace tiempo a Adolfo Lagos, por si tenía su Adobase algo más actualizado que el que yo tengo ( última actualización año 2008) y algunos ejemplos y al no recibir contestación me incliné por hacerlo así.
El error que digo es el siguiente :
Error description: Error BASE/1004 Class: 'LOGICAL' has no exported method: EVAL
Args:
[ 1] = L .F.
Stack Calls
===========
Called from: => EVAL( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTCELL( 9622 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTDATA( 9574 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 1434 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1253 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1666 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11649 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3154 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 270 )
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 426 )
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 31 )
Called from: => EVAL( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTCELL( 9622 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTDATA( 9574 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 1434 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1253 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1666 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11649 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3154 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 270 )
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 426 )
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 31 )
Called from: => EVAL( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTCELL( 9622 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTDATA( 9574 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 1434 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1253 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1666 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11649 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3154 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 980 )
Called from: D:\PROYEC~4\Pizarro\SOURCE\geshinic.prg => MAIN( 155 )
La verdad es que me escama este error, ya que he verificado con otro programa que tengo con ADO y Acces y no tengo ningún problema ni me da este error.
Este error sólo se produce en las líneas con el SetCheck.
A ver si me podéis iluminar un poco