Search on Array with Xbrowse (exe crash)

Search on Array with Xbrowse (exe crash)

Postby Silvio.Falconi » Mon May 29, 2023 11:45 am

Ho create a search on array with Xbrowse ?
I saw allready the sample xbsortcb.prg I inser a get to search into xbrowse but with no success
on function ArrBrw( aData ) the command COMBOBOX oBrw:oSortCbx not order the columns

Image



Code: Select all  Expand view
function Main()

   local aData

   FERASE( "CUSTOMER.CDX" )
   USE CUSTOMER NEW EXCLUSIVE VIA "DBFCDX"
  // aData := FW_DbfToArray( "FIRST,LAST,STREET", , { || RECNO() < 11 } )
    aData := FW_DbfToArray( "FIRST,LAST,STREET" )
   GO TOP
   FW_CdxCreate()
   CLOSE CUSTOMER

  * Usage1()
   *Usage2()
   ArrBrw( aData )

return nil

function ArrBrw( aData )

   local oDlg, oBrw

   local cSeek:=Space(100)   //bysilv
   local oGet

   DEFINE DIALOG oDlg SIZE 800,400 PIXEL TRUEPIXEL RESIZABLE

   @ 10, 165 GET oGet VAR cSeek SIZE 200,19 PIXEL OF oDlg PICTURE "@!"  //bysilv


   @ 60,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE aData ;
      AUTOCOLS ;
      HEADERS "NAME","SURNAME","ADDRESS" ;
      AUTOSORT ;
      NOBORDER LINES

   WITH OBJECT oBrw
      :nMarqueeStyle := 2
      :nColorBox    := CLR_HRED

           :lHScroll  := .f.      //bysilv
            :lIncrFilter      := .t.  //bysilv
            :bOnSort          := { |b,oCol| oBrw:Seek( "" ), ;     //bysilv
                                   oBrw:cFilterFld := oCol:cExpr, ;  //bysilv
                                   oBrw:SetFocus() }          //bysilv
            :oSeek := oGet       //bysilv

      :CreateFromCode()
   END

   @ 10,20 COMBOBOX oBrw:oSortCbx VAR oBrw:cSortOrder SIZE 100,400 PIXEL OF oDlg

   ACTIVATE DIALOG oDlg CENTERED

return nil

 

If I make a search on get sample "Dav " then the EXE crash , the exe go out ( no log file, no Hb_out file)
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7052
Joined: Thu Oct 18, 2012 7:17 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 115 guests