FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Problema con Xbrowse y arrays
Posts: 230
Joined: Sat Apr 19, 2008 10:28 PM
Problema con Xbrowse y arrays
Posted: Tue Feb 28, 2017 08:02 PM
Hola amigos,

Tengo un problema cuya solución no he encontrado en el foro. Tengo un Xbrowse con un array

Este código funciona

Code (fw): Select all Collapse
oBrw:aCols[ 1 ]:bEditValid := { | oGet, oCol |  oBrw:aArrayData[ oBrw:nArrayAt, 1 ] := mi_funcion1( oget:value )  , .t.  }


Sin embargo esto no funciona

Code (fw): Select all Collapse
oBrw:aCols[ 1 ]:bEditValid := { | oGet, oCol |  mi_funcion2( oGet , oBrw )  }

...

static function mi_funcion2( oGet,oBrw)

oBrw:aArrayData[ oBrw:nArrayAt, 1 ] := mifuncion1( oget:value ) 
return .t.



Muchas gracias y un saludo

Alvaro
Posts: 230
Joined: Sat Apr 19, 2008 10:28 PM
Re: Problema con Xbrowse y arrays
Posted: Tue Feb 28, 2017 11:02 PM

Ya lo he descubierto, hay que definir un bOnPostEdit para que funcione.

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Problema con Xbrowse y arrays
Posted: Thu Mar 02, 2017 01:51 PM
May I ask why do you want to use either bEditValid or bOnPostEdit?

If the purpose is to edit in the cell and assign the value to the array element, nothing is necessary.

Code (fw): Select all Collapse
@ r,c XBROWSE oBrw SIZE w,h PIXEL OF oDlg DATASOURCE aArray AUTOCOLS FASTEDIT 

oBrw:nEditTypes := EDIT_GET
oBrw:CreateFromCode()

This should be enough without any extra code.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion