Page 1 of 1

Antonio Linares - DbCombo

Posted: Thu Mar 09, 2006 9:21 pm
by jose_murugosa
Antonio,

Que estoy haciendo mal con este dbcombo?


REDEFINE DbCombo oCbx[1] VAR oDbf[1]:idProd ID 104 OF oPage:aDialogs[1] ;
ALIAS "CBOPROD" Itemfield "idProd" ListField "Nombre" ;
ON CHANGE ( PRODTOR->(DbSeek( oDbf[1]:aBuffer[1], .f. ) ), ;
oSay[21]:SetText(PRODTOR->Dicose), oPage:aDialogs[1]:Update() ) update

El campo idProd es numerico, el Nombre naturalmente de caracteres, estoy probando, porque me resulta muy importante la nueva capacidad de los Combos de manejar itemfield numericos, me compila sin errores pero me da el siguiente error de ejecución:

Called from: => ALLTRIM(0)
Called from: COMBOBOX.PRG => (b)TDBCOMBO:SET(0)
Called from: => ASCAN(0)
Called from: COMBOBOX.PRG => TDBCOMBO:SET(0)
Called from: dbcombo.prg => TDBCOMBO:DEFAULT(243)
Called from: dbcombo.prg => TDBCOMBO:INITIATE(275)
Called from: => __OBJSENDMSG(0)
Called from: HARBOUR.PRG => OSEND(0)
Called from: HARBOUR.PRG => ASEND(0)
Called from: DIALOG.PRG => TDIALOG:INITIATE(0)
Called from: DIALOG.PRG => TDIALOG:HANDLEEVENT(0)
Called from: => CREATEDLG(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: TPages.PRG => TPAGES:DEFAULT(0)
Called from: TPages.PRG => (b)TPAGES:TPAGES(0)
Called from: TPages.PRG => TPAGES:INITIATE(0)
Called from: => __OBJSENDMSG(0)
Called from: HARBOUR.PRG => OSEND(0)
Called from: HARBOUR.PRG => ASEND(0)
Called from: DIALOG.PRG => TDIALOG:INITIATE(0)
Called from: DIALOG.PRG => TDIALOG:HANDLEEVENT(0)
Called from: => DIALOGBOX(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: bam2.prg => BAM2(185)
Called from: liha.prg => (b)BARRABOT(167)
Called from: BTNBMP.PRG => TBTNBMP:CLICK(0)
Called from: BTNBMP.PRG => TBTNBMP:LBUTTONUP(0)
Called from: WINDOW.PRG => TWINDOW:HANDLEEVENT(0)
Called from: CONTROL.PRG => TBTNBMP:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TWINDOW:ACTIVATE(0)
Called from: liha.prg => MAIN(91)

Gracias desde ya por tu ayuda....

Que version fw usas

Posted: Fri Mar 10, 2006 12:26 am
by fsandoval
Si usas la version fw24 yo tambien tengo problemas con eso, no se en otras version de fw, yo los soluciones con btnget.

REDEFINE BTNGET oGet VAR GruArt ID 103 RESOURCE "combo" ACTION ( SelGrupo( oGet , 200 , 200 ) , oGet:KeyDown(VK_RETURN, 1)) ;
VALID (if( oDbGrupos:Seek( GruArt ) .and. !empty( GruArt ) , ( oDbGrupos:Load(), .t.) , ;
( MsgInfo( "El Grupo " + AllTrim( GruArt ) + ;
" no existe" ), .f. ))) OF oDlg UPDATE

espero te sirva de lago.

Posted: Fri Mar 10, 2006 7:05 am
by Antonio Linares
José,

Por favor descarga el build de Marzo de FWH y prueba con él. Gracias.

Ahora va

Posted: Fri Mar 10, 2006 5:43 pm
by jose_murugosa
Antonio,

Descargué nuevamente el FWH y reemplacé en el ejemplo por valores numéricos en la db y en el array y anduvo perfecto..
Gracias!!!!