FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour save changes made in Xbrowse
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
save changes made in Xbrowse
Posted: Wed Jun 14, 2017 10:34 PM
Hello,

I want to save changes made in xBrowse to a online file (MariaDB)

I"ve seen parts that uses
Code (fw): Select all Collapse
oBrw[1]:lColChangeNotify := .t.
oBrw[1]:bChange := { |oBrw, uOlddata| Changedata( oBrw, uOlddata ) }
or
oBrw[1]:bChange := { |obrw| OnColChange( oBrw ) }

function OnColChange( oBrw )

   // take action here
   ? oBrw:nColSel // --> new column number
   ? oBrw:SelectedCol() //--> new column object
   ? oBrw:SelectedCol():Value //--> value of the new column

   // using the above data you take your action

return nil


But maybe there is also a new method in Xbrowse that handle this better ?
If any change in a cell are done, then I want to save (Fieldname, oldvalue, newvalue)

So I also need the Older data of the cell, and the new data.

Any samples that uses this technique ?
Marc Venken

Using: FWH 23.08 with Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: save changes made in Xbrowse
Posted: Thu Jun 15, 2017 02:48 AM

oCol:bOnChange := { |oCol, uOldVal| OnColChange( oCol, uOldVal ) }

function OnColChange( oCol, uOldVal )

// Save
// oCol:cExpr, oCol:Value, uOldVal

return nil

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion