xHarbour to Harbour

xHarbour to Harbour

Postby Natter » Fri May 27, 2022 9:06 am

Hi,

Dragging my program from xHarbour to Harbour. Please tell me how to rewrite OVERRIDE in the Harbor syntax
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: xHarbour to Harbour

Postby Antonio Linares » Fri May 27, 2022 12:56 pm

Dear Natter,

> Please tell me how to rewrite OVERRIDE in the Harbor syntax

Please post an example of how you use it with xHarbour

thanks
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: xHarbour to Harbour

Postby Natter » Fri May 27, 2022 1:11 pm

Override Method MouseWheel In Class TXBrowse With XBr_MWhl
Override Method Copy In Class TGet With Cpy_

here - METHOD error
................................................................

atail(a_sp[len(a_sp),2]):=aclone(Str_Arr(dim[st,2,zz], chr(166)))

here - () error
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: xHarbour to Harbour

Postby Antonio Linares » Fri May 27, 2022 1:34 pm

This is the function that Harbour provides:

Code: Select all  Expand view
FUNCTION __objModMethod( oObject, cSymbol, nFuncPtr )

   IF ! HB_ISOBJECT( oObject ) .OR. ! HB_ISSTRING( cSymbol ) .OR. ! HB_ISSYMBOL( nFuncPtr )
      __errRT_BASE( EG_ARG, 3101, , ProcName( 0 ) )
   ELSEIF __objHasMethod( oObject, cSymbol )
      __clsModMsg( oObject:ClassH, cSymbol, nFuncPtr )
   ENDIF

   RETURN oObject
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: xHarbour to Harbour

Postby Natter » Fri May 27, 2022 1:50 pm

Antonio , thank you ! Excuse me, can I have a concrete example of using this function?
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: xHarbour to Harbour

Postby Antonio Linares » Fri May 27, 2022 4:29 pm

Please try this:

__clsModMsg( TXBrowse():ClassH, "MouseWheel", @XBr_MWhl() )

or

__clsModMsg( oXBrowse:ClassH, "MouseWheel", @XBr_MWhl() )
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: xHarbour to Harbour

Postby carlos vargas » Fri May 27, 2022 8:06 pm

use harbour/contrib/xhb

#include "xhbcls.ch"

to have xharbour compatibility with extended class modification
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1683
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: xHarbour to Harbour

Postby Natter » Sat May 28, 2022 4:03 pm

__clsModMsg( oXBrowse:ClassH, "MouseWheel", @XBr_MWhl() )
This option works

I use the function FW_MakeYourBitmap( nTop, nLeft, |hdc, w, h| PaintOverlay(hDC, w, img) }). When compiling under HARBOUR, I get the error of the PaintOverlay() function

Hi, Carlos !

#include "xhb.ch"
#include "xhbcls.ch"

Did I understand correctly that by connecting these 2 files I can not reco
mpile the program for Harbour?
Last edited by Natter on Sat May 28, 2022 9:09 pm, edited 1 time in total.
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: xHarbour to Harbour

Postby Antonio Linares » Sat May 28, 2022 8:38 pm

Is the function PaintOverlay() a xHarbour function ?

What library do you link to use it ?
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: xHarbour to Harbour

Postby Natter » Sat May 28, 2022 9:25 pm

FW_MakeYourBitmap( nTop, nLeft, |hdc, w, h| PaintOverlay(hDC, w, h, img) }).

In this case, PaintOverlay() is a static function gluing two images:

static function PaintOvelay(hDC, w, h, img)
..................................................
return NIL
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: xHarbour to Harbour

Postby Antonio Linares » Sat May 28, 2022 11:50 pm

> When compiling under HARBOUR, I get the error of the PaintOverlay() function

What error is it ?
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: xHarbour to Harbour

Postby Natter » Sun May 29, 2022 6:38 am

Turbo Incremental Link 6.70 Copyright (c) 1997-2014 Embarcadero Technologies, Inc.
Error: Unresolved external '_HB_FUN_PAINTOVERLAY' referenced from C:\PRGM\GIS\HRB\GS.OBJ
Error: Unable to perform link
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: xHarbour to Harbour

Postby Antonio Linares » Sun May 29, 2022 10:29 am

Try to remove "static" from here:

static function PaintOvelay(hDC, w, h, img)
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: xHarbour to Harbour

Postby Natter » Sun May 29, 2022 11:48 am

Yes, without "static" it compiles without errors!
Do I need to connect #include "xHb" and #include "xHb" ?
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: xHarbour to Harbour

Postby Antonio Linares » Sun May 29, 2022 8:25 pm

If you directly use __clsModMsg() then I guess you don't need the header file :-)
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

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 91 guests

cron