FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour From Xharbour to Harbour
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
From Xharbour to Harbour
Posted: Mon Mar 11, 2013 08:42 AM

Good morning

I am trying to move from xharbour to harbour, Using Fwh 13.02 bcc 5.82 Harbour from fivetech (latest)

I thought it would be straight forward, but finally many things to consider... After searching in the forums here is what i have

  1. From M. Rao , we have to #include "hbcompat.ch" on the top of ever program, easier to change fivewin.ch

  2. From Bayron

ifndef XHARBOUR

FUNCTION DbSkipper( n ) ; RETURN __DbSkipper( n )
FUNCTION DbPack() ; RETURN __DbPack()
FUNCTION DbZap() ; RETURN hb_DbZap()
FUNCTION CurDrive( x ) ; RETURN hb_CurDrive( x )
#command QUIT => ( PostQuitMessage( 0 ), __Quit() )

EndIf

  1. From Antonio spanish forum , change needed to fivewin.ch

xcommand CLASS <ClassName> [METACLASS <metaClass>] ;

         [ &lt;frm: FROM, INHERIT&gt; &lt;SuperClass1&gt; [,&lt;SuperClassN&gt;] ] ;
         [ &lt;modulfriend: MODULE FRIENDLY&gt; ] ;
         [ &lt;static: STATIC&gt; ] [ FUNCTION &lt;FuncName&gt; ] =&gt; ;
          [ ; #translate Super: =&gt; ::&lt;SuperClass1&gt;: ] ;;

My question what else is needed , i still get errors. Antonio , the above could be included in next releases ? especially the hpcompat.ch and the #xcommand

Anyone using Harbour with the same configuration ? can you please comment ?

Thanks for the help

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: From Xharbour to Harbour
Posted: Mon Mar 11, 2013 02:03 PM

Richard ,

xhb.ch (not hbcompat.ch) ! hbCompat.ch is called from here

Important for ains(Arr,n,.T.) or aDel(Arr,n,.T.)

See also viewtopic.php?f=3&t=24910&p=135436&hilit=Search+this+forum%E2%80%A6#p135436

Frank

test
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: From Xharbour to Harbour
Posted: Mon Mar 11, 2013 02:40 PM

To All

Does Harbour treat ADO dates from Sql databases as valtype "T" or "D" ?

(x)Harbour .. dDate := oRs:Fields("Date"):Value // = valtype "T"

Thanks
Rick Lipkin

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: From Xharbour to Harbour
Posted: Mon Mar 11, 2013 09:11 PM
Richard,

1. If you make a search for hbcompat.ch in FWH/samples folder you will see that just six PRGs use it, so it is not needed except on some specific examples.

2. QUIT should never be used from a Windows app. When the main window ends, then the FiveWin apps quit automatically.

3. That change is NOT needed if you are using the most recent Harbour from here:
http://code.google.com/p/harbour-and-xharbour-builds/downloads/detail?name=harbour_bcc582_20130228.zip&can=2&q=
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: From Xharbour to Harbour
Posted: Tue Mar 12, 2013 01:11 PM
Antonio Linares wrote:Richard,

1. If you make a search for hbcompat.ch in FWH/samples folder you will see that just six PRGs use it, so it is not needed except on some specific examples.

2. QUIT should never be used from a Windows app. When the main window ends, then the FiveWin apps quit automatically.

3. That change is NOT needed if you are using the most recent Harbour from here:
http://code.google.com/p/harbour-and-xharbour-builds/downloads/detail?name=harbour_bcc582_20130228.zip&can=2&q=


Antonio,

Trying this build from Harbour i got as error

Error description: Error BASE/1003 Variable does not exist: SUPER

Stack Calls
===========
Called from: xbrowse.prg => TXBRCODE:HANDLEEVENT( 11642 )

This line : return Super:HandleEvent( nMsg, nWParam, nLParam )

Changing Super:HandleEvent in ::HandleEvent seems to avoid the error on this place , but gives the same error on other places.

Note that i don't have problems with harbour_3.1_17025.zip , also from fwh

Frank
test
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: From Xharbour to Harbour
Posted: Tue Mar 12, 2013 02:19 PM

Frank
for every fwh class modified by you , add the following

ifdef HARBOUR

#ifndef XHARBOUR
#define Super ::super
#endif

endif

This is what i did and now it is ok,

I have my own tget.prg, xbrowse.prg and i added the above, i can now compile harbour ok. Still have some work on easyreport and codejock.

Thanks to Antonio for his support :D

Hth

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: From Xharbour to Harbour
Posted: Wed Mar 13, 2013 12:25 PM
Richard Chidiak wrote:Frank
for every fwh class modified by you , add the following

#ifdef __HARBOUR__
#ifndef __XHARBOUR__
#define Super ::super
#endif
#endif

This is what i did and now it is ok,

I have my own tget.prg, xbrowse.prg and i added the above, i can now compile harbour ok. Still have some work on easyreport and codejock.

Thanks to Antonio for his support :-)

Hth

Richard


Richard,

I got in xbrowse a lot off errors because ::... is translated in ::::...

Frank
test
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: From Xharbour to Harbour
Posted: Wed Mar 13, 2013 12:56 PM

In FWH 13.03 we have replaced all FWH calls to Super with ::Super.

We prefered to do this instead of using a define

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion