FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour problem xbrowse hash
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
problem xbrowse hash
Posted: Mon Oct 06, 2014 08:24 PM
this code throws me error when pressing the button. How do I reload the new data?
Code (fw): Select all Collapse
#include "FiveWin.Ch"
#include "xbrowse.ch"

//------------------------------------------------------------------//

function Main()

   local oDlg, oBrw
   local h := ReCreatehash()

  DEFINE DIALOG oDlg
  
   @ 15,5 XBROWSE oBrw SIZE -5,-5 PIXEL OF oDlg ;
      ARRAY h AUTOCOLS HEADERS 'Detail', 'Value' ;
      CELL LINES NOBORDER

   oBrw:nStretchCol  := 1
   oBrw:CreateFromCode()

   @ 1,5 button "refresh" ACTION obrw:setArray( Refreshhash() ) pixel
    
   ACTIVATE DIALOG oDlg CENTERED

return ( 0 )

//------------------------------------------------------------------//
 
 Function ReCreatehash()
local h := {=>}

   h["Age"]    := 45
   h["City"]   := 'NewYork'
   h["JoinDt"] := {^ 1997/12/21}
   h["First"]  := 'John'
   h["Last"]   := 'Abraham'
 
 Return h
 
 //------------------------------------------------------------------//
 
  Function Refreshhash()
local h := {=>}

   h["Age"]    := 48
   h["City"]   := 'Paris'
   h["JoinDt"] := {^ 1997/12/21}
   h["First"]  := 'Jose'
   h["Last"]   := 'Arias'
 
 Return h
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: problem xbrowse hash
Posted: Tue Oct 07, 2014 05:04 AM
Manuel,

In xbrowse.prg line 4233 please make this change:

Code (fw): Select all Collapse
      if Len( aData ) > 0 .and. ValType( aData ) == 'H' .and. ;  // remove [ 1 ]
         ValType( ATail( aData ) ) == 'H' .and. lAddCols
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 153
Joined: Tue Aug 05, 2014 09:48 AM
Re: problem xbrowse hash
Posted: Tue Oct 07, 2014 05:28 AM

Rebuild require after change in xbrowse.prg ?
How to do that

Regards, Greetings



Try FWH. You will enjoy it's simplicity and power.!
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: problem xbrowse hash
Posted: Tue Oct 07, 2014 05:33 AM

Dave,

The easiest way is to wait for a new FWH build from us.

In case that you need such change, to test it, simply add xbrowse.prg as another PRG of your app.

If you want to learn how to update your FWH libraries there are many explanations about it on these forums. If you don't find it, I can point you to an explanation.

Are you using Borland ? Are you using Harbour ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 153
Joined: Tue Aug 05, 2014 09:48 AM
Re: problem xbrowse hash
Posted: Tue Oct 07, 2014 05:44 AM
Antonio Linares wrote:Dave,
Are you using Borland ? Are you using Harbour ?

I am using Borland and Harbour, this is new experience for me
Regards, Greetings



Try FWH. You will enjoy it's simplicity and power.!
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: problem xbrowse hash
Posted: Tue Oct 07, 2014 05:47 AM

Basically all you have to do is:

  1. Compile the PRG using Harbour

  2. Compile the resulting C file using bcc32 (check buildh.bat to see how this is done)

  3. Replace the module in the library:

tlib.exe fiveh.lib -+ xbrowse.obj

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion