oBrw:report() still need help..

Postby James Bott » Thu Sep 18, 2008 12:16 am

Harvey,

I think I mentioned before (in another thread) that you should consider moving your filter data to a database so you don't have to recompile your program to change them.

It appears that you have three groups of data (three filters). I assume that you have an accounts file, so you should be able to add a field to that file that contains the filter group. Then you can tag each account with the group that it belongs to. Of course, the tags could be changed in a data entry screen so you don't have to hard code them and they could be changed at any time.

This is just an example--I would have to know more about your filter groups to propose a good solution.

This is probably not something you want to get into now (during your conversion) but it is something to think about for the future.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby James Bott » Thu Sep 18, 2008 1:04 am

Antonio,

There is a bug in xbrowse. When you have a filter set and oBrw:refresh() is called, it crashes with the error below. This is the line where it is crashing. I don't know why it thinks eval() is a method.

Code: Select all  Expand view
            if ! ( ::cAlias )->( Eval( bFilter ) )


James

Code: Select all  Expand view
  Error description: Error BASE/1004  No exported method: EVAL
   Args:
     [   1] = L   .T.

Stack Calls
===========
   Called from:  => EVAL(0)
   Called from: xbrowse.prg => TXBROWSE:DELREPOS(873)
   Called from: xbrowse.prg => TXBROWSE:REFRESH(836)
   Called from: xbrowse.prg => TXBROWSE:REPORT(4530)
   Called from: Test08.prg => (b)MAIN(22)
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby James Bott » Thu Sep 18, 2008 1:50 am

Antonio,

OK, I think I have a solution. bFilter was not actually a codeblock. This is from the method DelRepos().

Regards,
James

Code: Select all  Expand view
elseif ! Empty( cFilter := ( ::cAlias )->( dbFilter() ) )
            //bFilter  :=  ( ::cAlias )->( &cFilter )
            cFilter  :=  ( ::cAlias )->( &cFilter )
            if ! eval( {|| cFilter } ) //( ::cAlias )->( Eval( bFilter ) )
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby hag » Thu Sep 18, 2008 7:11 am

Thanks to James problem solved.

I'm sure he'll be making some recommendations on xbrowse.

He has been a gem in his help.... :D
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 88 guests