Convert Clipper 5.1 to xHarbour Console app

Convert Clipper 5.1 to xHarbour Console app

Postby anserkk » Wed Nov 25, 2009 10:13 am

Hi all,

I am trying to convert one of my old clipper 5.1 program to a 32bit xHarbour console app. I am able to generate the exe file without any errors but when I try to run the exe nothing happens and If I check the task manager it shows that the exe is running.

My clipper app did not have a Main() and while compiling with xHarbour it was giving error and then I added the Function Main() in my Prg. After adding Main() it compiled without any errors and generated the exe file.

Is there anything specific that I have to consider while converting the Old Clipper 5.1 app to a xHourbour console app ?

Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Convert Clipper 5.1 to xHarbour Console app

Postby anserkk » Wed Nov 25, 2009 10:29 am

The following thread helped me to solve the issue
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=17066

Solution :
I got it working by adding the xHarbour lib GTWIN to my .rmk file

Also added the following procedure to my main prg to solve the problem

Code: Select all  Expand view
procedure FW_GT
return


Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Convert Clipper 5.1 to xHarbour Console app

Postby anserkk » Wed Nov 25, 2009 11:53 am

Can anybody confirm that in Console mode app the command
"Restore from file.mem additive" is supported or not

The following line is giving Runtime error
Code: Select all  Expand view
restore from &(dbpath+"indexer.mem") additive


Code: Select all  Expand view
Unrecoverable Error 9100:
Restore failed, Unsupported type:65476 for MINDEXER


MINDEXER is a date variable available in the .mem file

The following are my observations:

* I am testing it in Vista 32bit.
* I am getting run time errors here and there (Solving the problems one by one). Not very sure whether the effort is worth or not.
* The screen size is small (Same as the 16 bit Clipper app).
* The screen is scrolling up and down inside the console window.
* The console window does not close automatically when I quit my app. I have to click the close button.
* App .Exe is functioning very fast compared to 16 bit clipper App .exe

Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Convert Clipper 5.1 to xHarbour Console app

Postby carlos vargas » Wed Nov 25, 2009 5:05 pm

Recomendado con app consolas poner al inicio de la aplicacion

Code: Select all  Expand view

...
REQUEST GT_WIN
...
PROCEDURE Main()
  ...
  SetMode(25,80)
  ...

RETURN
 


Cuidado con los comando SAVE TO .. y RESTORE FROM ...
Por el asunto de la limitante en el tamaño de los nombres de variables 10 caracteres en Clipper
dicha limitante no existe en harbour.

...

salu2
carlos vargas
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1720
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Convert Clipper 5.1 to xHarbour Console app

Postby anserkk » Thu Nov 26, 2009 6:36 am

Dear Mr.Carlos,

Thank you for providing the hint. The command SetMode(25,80) was helpful. By adding SetMode(25,80), the screen flickering and scrolling problem solved.

I deleted all Obj/C files generated by xHarbour compiler and then recompiled again and found that the Restore from <Memfile.mem> additive is working fine. Recompiling also solved the problem in closing the Console window. Now when I quit my console app, the console window is also closed automatically (As desired).

It seems that the only problem left is the screen painting of a Browser Object while moving the cursor highlight bar (A general purpose browser designed with the Tbrowse object of clipper.). In clipper it is working fine. Not sure what has to be modified to solve this particular problem :?

I am using xHarbour and have linked only the following xHarbour Libs

rtl.lib
vm.lib
gtwin.lib
lang.lib
macro.lib
dbfntx.lib
rdd.lib
dbfcdx.lib
dbffpt.lib
hbsix.lib
hbsix.lib
debug.lib
common.lib
pp.lib
pcrepos.lib

I tried the command which you have specified

REQUEST GT_WIN

But it is giving me error (Function not found)

The command REQUEST HB_GT_WIN_DEFAULT is working fine

Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 73 guests