From Xharbour to Harbour

From Xharbour to Harbour

Postby Richard Chidiak » Mon Mar 11, 2013 8: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

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

#xcommand CLASS <ClassName> [METACLASS <metaClass>] ;
[ <frm: FROM, INHERIT> <SuperClass1> [,<SuperClassN>] ] ;
[ <modulfriend: MODULE FRIENDLY> ] ;
[ <static: STATIC> ] [ FUNCTION <FuncName> ] => ;
[ ; #translate Super: => ::<SuperClass1>: ] ;;

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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: From Xharbour to Harbour

Postby Franklin Demont » Mon Mar 11, 2013 2: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
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: From Xharbour to Harbour

Postby Rick Lipkin » Mon Mar 11, 2013 2: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
User avatar
Rick Lipkin
 
Posts: 2615
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: From Xharbour to Harbour

Postby Antonio Linares » Mon Mar 11, 2013 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: From Xharbour to Harbour

Postby Franklin Demont » Tue Mar 12, 2013 1: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 ::Super: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
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: From Xharbour to Harbour

Postby Richard Chidiak » Tue Mar 12, 2013 2: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: From Xharbour to Harbour

Postby Franklin Demont » 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 :D

Hth

Richard


Richard,

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

Frank
test
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: From Xharbour to Harbour

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Ask Jeeves [Bot] and 23 guests