Migrating to Harbour
- Antonio Linares
- Site Admin
- Posts: 42456
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 20 times
- Been thanked: 58 times
- 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: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- Contact:
Re: Migrating to Harbour
Antonio Linares wrote:Enrico,
https://github.com/harbour/core/tree/master
Now you have Harbour full source code
Thank you, downloaded!
EMG
- Enrico Maria Giordano
- Posts: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- Contact:
Re: Migrating to Harbour
Antonio,
Are you sure about that "1"? From tclass.prg:
and
and
I'm confused...
EMG
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
__clsAddMsg( hClass, "hClass" , 1, HB_OO_MSG_ACCESS )
__clsAddMsg( hClass, "_hClass" , 1, HB_OO_MSG_ASSIGN )
and
Code: Select all | Expand
__clsAddMsg( hClass, "aDatas" , 3, HB_OO_MSG_ACCESS )
__clsAddMsg( hClass, "_aDatas" , 3, HB_OO_MSG_ASSIGN )
and
Code: Select all | Expand
__clsAddMsg( hClass, "AddData" , @AddData() , HB_OO_MSG_METHOD )
I'm confused...
EMG
- Enrico Maria Giordano
- Posts: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- Contact:
Re: Migrating to Harbour
Antonio,
Ok, I'll try this too, thank you.
EMG
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
- Enrico Maria Giordano
- Posts: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- Contact:
Re: Migrating to Harbour
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
- Enrico Maria Giordano
- Posts: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- Contact:
Re: Migrating to Harbour
Code: Select all | Expand
? TControl():hClass
Code: Select all | Expand
Error BASE/1004 Message not found: TCONTROL:HCLASS
EMG
- Enrico Maria Giordano
- Posts: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- Contact:
Re: Migrating to Harbour
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
REQUEST HB_GT_GUI_DEFAULT
EMG
- Enrico Maria Giordano
- Posts: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- 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 | Expand
MEMOLINE( cRes, 1024, 1, , .F., .T., @nPos )
It keeps reading the first line.
EMG
- Antonio Linares
- Site Admin
- Posts: 42456
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 20 times
- Been thanked: 58 times
- Contact:
- Enrico Maria Giordano
- Posts: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- 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: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- 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: 42456
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 20 times
- Been thanked: 58 times
- Contact:
- Enrico Maria Giordano
- Posts: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- Contact:
Re: Migrating to Harbour
Antonio,
here it is:
EMG
here it is:
Code: Select all | Expand
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
- Antonio Linares
- Site Admin
- Posts: 42456
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 20 times
- Been thanked: 58 times
- 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: 8738
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 2 times
- 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