FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Xbrowse : bEditWhen
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Xbrowse : bEditWhen
Posted: Sun Feb 10, 2013 09:34 AM
Hello ,

Code (fw): Select all Collapse
:oCol("Type"):nEditType      := EDIT_GET_LISTBOX
:oCol("Type"):aEditListTxt   := {"Numeric","Character","Logical","Date","Memo"}
:oCol("Type"):aEditListBound := {"N","C","L","D","M"}
:oCol("Type"):bEditWhen      := {|oGet|ASCAN(aOld,{|a|a[1]==oBrw:aRow[1]})==0 }


The when clausule works not on the combobox , we can select a item and change the input field !

FWH 12.03

Frank
test
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Xbrowse : bEditWhen
Posted: Mon Feb 11, 2013 03:41 AM
Thanks for pointing out. Please apply this fix.

Please locate the following lines in the METHOD PostEdit
Code (fw): Select all Collapse
      case ::nEditType == EDIT_LISTBOX

           if xValue != nil
              Eval( ::bOnPostEdit, Self, xValue, If( ::oEditLbx != nil, ::oEditLbx:nLastKey, 0 ) )
              nLastKey   := If( ::oEditLbx != nil, ::oEditLbx:nLastKey, 0 )
              lGoNext    := ( nLastKey == VK_RETURN )
           endif

Please replace with:
Code (fw): Select all Collapse
      case ::nEditType == EDIT_LISTBOX

           if xValue != nil
              if lDirectAssign .or. ::bEditWhen == nil .or. Eval( ::bEditWhen, Self )  // inserted now 
                 Eval( ::bOnPostEdit, Self, xValue, If( ::oEditLbx != nil, ::oEditLbx:nLastKey, 0 ) )
              endif // inserted now
              nLastKey   := If( ::oEditLbx != nil, ::oEditLbx:nLastKey, 0 )
              lGoNext    := ( nLastKey == VK_RETURN )
           endif
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion