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....
Antonio Linares - DbCombo
- jose_murugosa
- Posts: 943
- Joined: Mon Feb 06, 2006 4:28 pm
- Location: Uruguay
- Contact:
Que version fw usas
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.
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.
fernando sandoval ruiz
fsandoval@hotmail.com
fsandoval@hotmail.com
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- jose_murugosa
- Posts: 943
- Joined: Mon Feb 06, 2006 4:28 pm
- Location: Uruguay
- Contact:
Ahora va
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!!!!
Descargué nuevamente el FWH y reemplacé en el ejemplo por valores numéricos en la db y en el array y anduvo perfecto..
Gracias!!!!