FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse 1408 Edit_Get_Button
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
xBrowse 1408 Edit_Get_Button
Posted: Fri Oct 17, 2014 02:20 PM
Antonio and Rao

Just ran across this xBrowse error with Edit_Get_Button when LabrBrow() closes.. the error only happens with 1408 and not with my older version. Here is my code and the error.

Rick Lipkin

Code (fw): Select all Collapse
          // labor
          ADD oCol to oLbxB AT 6 HEADER 'Labor' size 50     //60
          oLbxB:aCols[ 6 ]:nEditType  := EDIT_GET_BUTTON
          oLbxB:aCols[ 6 ]:bEditBlock := {|row, col, oCol| ;
                       If(oRsDetail:Fields("Inventory Type"):Value = "Labor",;
                       ( nAmount := _LabrBrow( ;
                       nRepairNumber,;
                       aEmp,;
                       aTech,;
                       oRsDetail,;
                       "","","","","","R","A",oRsDetail:Fields("Unique Line"):Value ),;
                       oRsDetail:Fields("Price"):Value := nAmount,;
                       oRsDetail:Update()), MsgInfo( "Type is not Labor"))   }  // repair

          oLbxB:aCols[ 6 ]:addbmpfile( "clockview.bmp" )
          oLbxB:aCols[ 6 ]:addbmpfile( "clockadd.bmp" )
          oLbxB:aCols[ 6 ]:bBmpData := { | lValue | If( oRsDetail:Fields("IsLabor"):Value = .t., 1, 2 ) }
          oLbxB:aCols[ 6 ]:lBtnTransparent := .t.




Code (fw): Select all Collapse
Application
===========
   Path and name: C:\Fox\SaLite\Saw32.Exe (32 bits)
   Size: 5,045,760 bytes
   Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20131030)
   FiveWin  Version: FWHX 14.08
   Windows version: 5.1, Build 2600 Service Pack 3

   Time from start: 0 hours 0 mins 13 secs 
   Error occurred at: 10/17/2014, 10:08:06
   Error description: Error BASE/1004  Class: 'NIL' has no exported method: EVAL
   Args:
     [   1] = U   
     [   2] = O   TXBRWCOLUMN
     [   3] = U   
     [   4] = N   27

Stack Calls
===========
   Called from:  => EVAL( 0 )
   Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:POSTEDIT( 11948 )
   Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:RUNBTNACTION( 11857 )
   Called from: .\source\classes\XBROWSE.PRG => (b)TXBRWCOLUMN:CREATEBUTTONS( 11218 )
   Called from: btnbmp.PRG => TBTNBMP:CLICK( 522 )
   Called from: btnbmp.PRG => TBTNBMP:LBUTTONUP( 752 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1723 )
   Called from: btnbmp.PRG => TBTNBMP:HANDLEEVENT( 1601 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3291 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1015 )
   Called from: Main.prg => MAIN( 319 )
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse 1408 Edit_Get_Button
Posted: Fri Oct 17, 2014 02:27 PM

We shall look into this on priority.

Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse 1408 Edit_Get_Button
Posted: Tue Oct 21, 2014 09:49 AM

FWH 14.09 does not raise an error.

But kindly note that the EDIT_XXXXX constants are intended to be used to set oCol:nEditType to edit the data of the column. In other words, when the column does not contain any data at all as in your above case, use of any EDIT_XXX is not an intended usage.

In the above example, better option would be to triggger the action on double click or pressing enter key.

oCol:bLDClickData := { || MyDialog() }
oCol:bKeyDown := {|nKey| If( nKey == VK_ENTER, ( MyDialog(), 0 ), nil ) }
Note: From FWH 14.09 we can assign bKeyDown and bKeyChar to column objects also

Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: xBrowse 1408 Edit_Get_Button
Posted: Tue Oct 21, 2014 01:31 PM

Rao

Thank you for your recent fixes !!

Rick Lipkin

Continue the discussion