Eror en oGet:bKeyChar (Error BASE/1070 Argument Error "

Eror en oGet:bKeyChar (Error BASE/1070 Argument Error "

Postby albeiroval » Wed Dec 26, 2007 9:22 pm

Disculpen Maestros,

Este es el fuente del programa que me pruduce el error,

De antemano muchas gracias por la ayuda,


Error BASE/1070 Argument error "==", en la evaluacion de
oGet:bKeyChar = {|| oGetTipo( oGet ) }




@ 06, 01 SAY "TIPO ";
FONT oFont;
SIZE 040, 060;
OF oDlg;
GET oGet;
VAR aButtom[ _BUTOMTIPO ];
FONT oFont;
PICTURE "999";
OF oDlg
oGet:bKeyChar = {|| oGetTipo( oGet ) }

@ 07, 01 SAY "SUBTIPO ";
FONT oFont;
SIZE 040, 060;
OF oDlg;
GET oGet1;
VAR aButtom[ _BUTOMSUBT ];
FONT oFont;
PICTURE "999";
OF oDlg


@ 7.5, 04 BUTTON oBtn PROMPT "&Aceptar" OF oDlg SIZE 40, 12;
ACTION ( ModiButton( oLbx, aButtom ), lExit := TRUE, oDlg:End() )

@ 7.5, 12 BUTTON oBtn PROMPT "&Salir" OF oDlg SIZE 40, 12 ;
ACTION ( lExit := TRUE, oDlg:End() )

ACTIVATE DIALOG oDlg VALID lExit

RELEASE FONT oFont

return nil


static PROCEDURE oGetTipo( oGet )
oGet:varput( ListaTipos() )
oGet:refresh()
return


static FUNCTION ListaTipos()
LOCAL oDlg, oBrw
LOCAL aSample := { "Individual", "Combo" }
LOCAL nItem := 1
LOCAL Tipo := 0

DEFINE DIALOG oDlg FROM 2, 2 TO 10, 50 TITLE "Lista de Tipos"

@ 1, 2 LISTBOX oBrw ;
FIELDS If( Len( aSample ) > 0, aSample[ nItem ], "" ) ;
HEADERS "Tipo Producto" ;
FIELDSIZES 200 ;
OF oDlg ;
SIZE 100, 24

oBrw:bGoTop = { || nItem := 1 }
oBrw:bGoBottom = { || nItem := Eval( oBrw:bLogicLen ) }
oBrw:bSkip = { | nWant, nOld | nOld := nItem, nItem += nWant,;
nItem := Max( 1, Min( nItem, Eval( oBrw:bLogicLen ) ) ),;
nItem - nOld }
oBrw:bLogicLen = { || Len( aSample ) }
oBrw:cAlias = "Array" // Just put something

@ 0.5, 20 BUTTON "&Seleccion" OF oDlg ;
ACTION ( Tipo := nItem, oDlg:End() )

@ 1.5, 20 BUTTON "&Salir " OF oDlg ACTION oDlg:End()

ACTIVATE DIALOG oDlg CENTERED

return Tipo
User avatar
albeiroval
 
Posts: 380
Joined: Tue Oct 16, 2007 5:51 pm
Location: Barquisimeto - Venezuela

Postby Antonio Linares » Wed Dec 26, 2007 11:22 pm

Ese error se detectó y ha sido corregido ya. De momento puedes hacer:

oGet:bKeyChar = {|| oGetTipo( oGet ), 1 }

Si devuelves un cero, no se procesaran las teclas pulsadas:

oGet:bKeyChar = {| nKey | If( nKey == K_..., ( ..., 0 ), 1 ) }
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42159
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 28 guests