Migrating to Harbour
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Migrating to Harbour
Are you using FWH CopyFile() ?
Why can't you use Harbour ? What else is missing ?
Why can't you use Harbour ? What else is missing ?
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Migrating to Harbour
Thank you, downloaded!Antonio Linares wrote:Enrico,
https://github.com/harbour/core/tree/master
Now you have Harbour full source code
EMG
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Migrating to Harbour
Antonio,
and
and
I'm confused...
EMG
Are you sure about that "1"? From tclass.prg:Antonio Linares wrote: __clsAddMsg( hClass, "NewData" , 1, HB_OO_MSG_ACCESS )
__clsAddMsg( hClass, "_NewData" , 1, HB_OO_MSG_ASSIGN )
Code: Select all
__clsAddMsg( hClass, "hClass" , 1, HB_OO_MSG_ACCESS )
__clsAddMsg( hClass, "_hClass" , 1, HB_OO_MSG_ASSIGN )
Code: Select all
__clsAddMsg( hClass, "aDatas" , 3, HB_OO_MSG_ACCESS )
__clsAddMsg( hClass, "_aDatas" , 3, HB_OO_MSG_ASSIGN )
Code: Select all
__clsAddMsg( hClass, "AddData" , @AddData() , HB_OO_MSG_METHOD )
EMG
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Migrating to Harbour
Antonio,
EMG
Ok, I'll try this too, thank you.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
EMG
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Migrating to Harbour
Yes. I just compiled and run the sample I reported.Antonio Linares wrote:Are you using FWH CopyFile() ?
I don't know. First step is getting a working EXE.Antonio Linares wrote:Why can't you use Harbour ? What else is missing ?
EMG
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Migrating to Harbour
Code: Select all
? TControl():hClass
Code: Select all
Error BASE/1004 Message not found: TCONTROL:HCLASS
EMG
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Migrating to Harbour
Solved with:Enrico Maria Giordano wrote:One more problem: a console pops up when I run my EXEs. How to get rid of it?
Code: Select all
REQUEST HB_GT_GUI_DEFAULT
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Migrating to Harbour
Another problem. The following call doesn't work as expected:
It keeps reading the first line.
EMG
Code: Select all
MEMOLINE( cRes, 1024, 1, , .F., .T., @nPos )
EMG
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Migrating to Harbour
Enrico,
Sorry, it is ClassH instead of hClass
Sorry, it is ClassH instead of hClass
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Migrating to Harbour
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
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
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Migrating to Harbour
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
- 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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Migrating to Harbour
Enrico,
How to test the memoline() problem that you have found ?
How to test the memoline() problem that you have found ?
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Migrating to Harbour
Antonio,
here it is:
EMG
here it is:
Code: Select all
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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Migrating to Harbour
Enrico,
There is a little bug in your code. This is the right code
? ALLTRIM( MEMOLINE( cTxt, 1024, i, , .F., .T., @nPos ) )
There is a little bug in your code. This is the right code
? ALLTRIM( MEMOLINE( cTxt, 1024, i, , .F., .T., @nPos ) )
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Migrating to Harbour
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
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