Migrating to Harbour

Re: Migrating to Harbour

Postby Antonio Linares » Thu Dec 11, 2014 8:17 am

Are you using FWH CopyFile() ?

Why can't you use Harbour ? What else is missing ? :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Migrating to Harbour

Postby Enrico Maria Giordano » Thu Dec 11, 2014 10:21 am

Antonio Linares wrote:Enrico,

https://github.com/harbour/core/tree/master

Now you have Harbour full source code :-)


Thank you, downloaded! :-)

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrating to Harbour

Postby Enrico Maria Giordano » Thu Dec 11, 2014 10:25 am

Antonio,

Antonio Linares wrote: __clsAddMsg( hClass, "NewData" , 1, HB_OO_MSG_ACCESS )
__clsAddMsg( hClass, "_NewData" , 1, HB_OO_MSG_ASSIGN )


Are you sure about that "1"? From tclass.prg:

Code: Select all  Expand view
        __clsAddMsg( hClass, "hClass"         ,  1, HB_OO_MSG_ACCESS )
         __clsAddMsg( hClass, "_hClass"        ,  1, HB_OO_MSG_ASSIGN )


and

Code: Select all  Expand view
        __clsAddMsg( hClass, "aDatas"         ,  3, HB_OO_MSG_ACCESS )
         __clsAddMsg( hClass, "_aDatas"        ,  3, HB_OO_MSG_ASSIGN )
 


and

Code: Select all  Expand view
        __clsAddMsg( hClass, "AddData"        , @AddData()        , HB_OO_MSG_METHOD )


I'm confused... :-(

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrating to Harbour

Postby Enrico Maria Giordano » Thu Dec 11, 2014 10:25 am

Antonio,

Antonio Linares wrote:Enrico,

hClass is the handle of a Class, you can access it this way:

TAnyClass():hClass

or directly from an existing object:

oObject:hClass


Ok, I'll try this too, thank you.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrating to Harbour

Postby Enrico Maria Giordano » Thu Dec 11, 2014 10:28 am

Antonio Linares wrote:Are you using FWH CopyFile() ?


Yes. I just compiled and run the sample I reported.

Antonio Linares wrote:Why can't you use Harbour ? What else is missing ? :-)


I don't know. First step is getting a working EXE.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrating to Harbour

Postby Enrico Maria Giordano » Thu Dec 11, 2014 10:34 am

Code: Select all  Expand view
? TControl():hClass


Code: Select all  Expand view
Error BASE/1004  Message not found: TCONTROL:HCLASS


:-(

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrating to Harbour

Postby Enrico Maria Giordano » Thu Dec 11, 2014 12:52 pm

Enrico Maria Giordano wrote:One more problem: a console pops up when I run my EXEs. How to get rid of it?


Solved with:

Code: Select all  Expand view
REQUEST HB_GT_GUI_DEFAULT


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrating to Harbour

Postby Enrico Maria Giordano » Thu Dec 11, 2014 1:16 pm

Another problem. The following call doesn't work as expected:

Code: Select all  Expand view
MEMOLINE( cRes, 1024, 1, , .F., .T., @nPos )


It keeps reading the first line. :-(

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrating to Harbour

Postby Antonio Linares » Thu Dec 11, 2014 1:45 pm

Enrico,

Sorry, it is ClassH instead of hClass :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Migrating to Harbour

Postby Enrico Maria Giordano » Thu Dec 11, 2014 2:04 pm

Antonio,

I found contrib/xhb/xhbcls.ch that should offer EXTEND CLASS command. But to check it I first need to solve the MEMOLINE() problem...

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrating to Harbour

Postby Enrico Maria Giordano » Thu Dec 11, 2014 4:07 pm

Summary:

- FileCopy failed to copy filename with à or similar characters

- Memoline don't work properly

- EXTEND CLASS command to check

I really can't believe that someone could have migrated to Harbour with these problems... :?:

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrating to Harbour

Postby Antonio Linares » Thu Dec 11, 2014 6:44 pm

Enrico,

How to test the memoline() problem that you have found ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Migrating to Harbour

Postby Enrico Maria Giordano » Thu Dec 11, 2014 7:19 pm

Antonio,

here it is:

Code: Select all  Expand view
FUNCTION MAIN()

    LOCAL cTxt := "This is a test" + CHR( 13 ) + CHR( 10 ) + "This is another test"

    LOCAL nLines

    LOCAL nPos := 1

    LOCAL i

    nLines = MLCOUNT( cTxt, 1024, , .F., .T. )

    ? "Lines: " + LTRIM( STR( nLines ) )
    ?

    FOR i = 1 TO nLines
        ? ALLTRIM( MEMOLINE( cTxt, 1024, 1, , .F., .T., @nPos ) )
    NEXT

    INKEY( 0 )

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Migrating to Harbour

Postby Antonio Linares » Fri Dec 12, 2014 7:45 am

Enrico,

There is a little bug in your code. This is the right code :-)

? ALLTRIM( MEMOLINE( cTxt, 1024, i, , .F., .T., @nPos ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Migrating to Harbour

Postby Enrico Maria Giordano » Fri Dec 12, 2014 7:58 am

Antonio,

No! The syntax is correct. The third parameter must be 1 because it indicates the line to read starting at nPos. If I replace 1 with i I get only the first line in xHarbour. It looks like Harbour doesn't support parameter nPos... :-(

Unfortunately I'm still unable to use Harbour to compile my applications... :-(

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 53 guests