Page 1 of 1

Autoget Error in FW May 2014 and June 2014

Posted: Fri Jul 11, 2014 9:55 am
by Maurizio
When I try testage5.prg I have this error

Error description: Error BASE/1004 No exported method: EVAL
Args:
[ 1] = U

Stack Calls
===========
Called from: => (b)EVAL( 0 )
Called from: .\source\classes\AUTOGET.PRG => (b)TGETLIST( 312 )
Called from: .\source\classes\AUTOGET.PRG => TGETLIST:KEYCOUNT( 0 )
Called from: .\source\classes\AUTOGET.PRG => TAUTOGET:CREATELIST( 159 )
Called from: .\source\classes\AUTOGET.PRG => TAUTOGET:OPENLIST( 271 )
Called from: .\source\classes\AUTOGET.PRG => (b)TAUTOGET( 54 )
Called from: .\source\classes\AUTOGET.PRG => TAUTOGET:KEYCHAR( 0 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1733 )
Called from: .\source\classes\TGET.PRG => TAUTOGET:HANDLEEVENT( 589 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3279 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 277 )
Called from: TESTAGE5.prg => MAIN( 42 )

Regards Maurizio

Re: Autoget Error in FW May 2014 and June 2014

Posted: Mon Jul 14, 2014 4:49 pm
by Antonio Linares
Maurizio,

Please try this change in Class TAutoGet:

METHOD KeyCount() INLINE If( ! Empty( ::bKeyCount ), Eval( ::bKeyCount ), 0 )

Re: Autoget Error in FW May 2014 and June 2014

Posted: Tue Jul 15, 2014 6:58 am
by Maurizio
Antonio,
now no error , but doesn't work , when I press a letter nothing happens .

Thank Maurizio
www.nipeservice.com

Re: Autoget Error in FW May 2014 and June 2014

Posted: Tue Jul 15, 2014 7:07 am
by Antonio Linares
Maurizio,

Class TAutoGet has been developed by Daniel García Gil, I am going to ask him, thanks

Re: Autoget Error in FW May 2014 and June 2014

Posted: Tue Jul 15, 2014 11:16 am
by Daniel Garcia-Gil
Hello

the integration with DBF is not implemented yet, the sample testage5.prg didn't should be distributed until finish the DBF integration, please use an array or hash instead of DBF

sorry my mistake

Re: Autoget Error in FW May 2014 and June 2014

Posted: Sun May 14, 2017 11:56 am
by David Williams
Hello Daniel,

Was testage5.prg ever completed? Has anybody got an example of a wild seek using DBFCDX?

Regards
David

Re: Autoget Error in FW May 2014 and June 2014

Posted: Thu May 18, 2017 11:36 am
by nageswaragunupudi
Till integration with DBF is completed by Mr Daniel, we can use this sample to use DBF

Code: Select all

#include "fivewin.ch"
#include "autoget.ch"

REQUEST DBFCDX

static lSeekWild := .t.

function main()

   field FIRST

   local oDlg, oGet, cName, cName1, cName2
   local oRs,  cAlias := "CUST"
   cName := space(20)

   USE CUSTOMER NEW ALIAS CUST SHARED VIA 'DBFCDX'
   INDEX ON UPPER(FIRST) TAG FIRST1 TO TMP MEMORY
   SET ORDER TO TAG FIRST1
   GO TOP

   define dialog oDlg title "Test Autoget" size 600, 480 pixel

   @ 1,2 autoget oGet var cName of oDlg ;
         DATASOURCE {};
         FILTER CUST->( ListFilter1( uDataSource, cData, Self ) );
         COLUMN 1 ;
         HEIGHTLIST 100

   @ 3,2 BUTTON "ok" OF odlg ACTION msgalert("Get 1:"+cName)
   @ 3,20 BUTTON "close" OF odlg ACTION odlg:end()

   activate dialog oDlg centered

return nil

//---------------------------------------------------------------------------//
// match case without case sensitive
function ListFilter1( aList, cData, oSelf )

   local aNewList := {}
   local cFor     := Upper( AllTrim( cData ) )
   local bFor

   if lSeekWild
      cFor     := '"' + cFor + '" $ UPPER(FIRST)'
   else
      cFor     := 'UPPER(FIRST)="' + cFor + '"'
   endif

   bFor     := &( "{ ||" + cFor + "}" )

   aNewList    := FW_DbfToArray( "FIRST", bFor )

RETURN aNewList

//---------------------------------------------------------------------------//
 
You may toggle static variable lSeekWild as .T. or .F.