Page 1 of 2

Using HMG or HMG Extended with xHarbour.com

Posted: Wed May 12, 2010 3:21 am
by tomfromdare
Anyone:

I'm impressed with the scope of hmg library, after being disappointed in 2007 when converting a large and complex application from Clipper to xHarbour.com. The application is used in at least 10 warehouses and has been dependable. However, the client really wants an "interface refresh" meaning I should make it look like a Windows program and not a DOS program.

When I try to compile it in hmg, I have to overcome several incompatibilities, then discover that the first time a file is opened, it gives an error. I tried the same process with a much smaller, though complex, clipper program with the same result.

When I build from scratch using the hmg environment, opening files works fine. So I don't understand the interaction between GUI lib and file access!

Searching the forums suggests that "hmg extended" can be used with xHarbour, but the README there doesn't mention such a thing. Anyone point me in the best direction to take a large xHarbour.com program and, screen by screen, replace the text screens with GUI?

Thanks!
Tom

Re: Using HMG or HMG Extended with xHarbour.com

Posted: Wed May 12, 2010 10:50 am
by dhaine_adp
Hi Tom,

What Harbour or xHarbour says is that it can compile Clipper codes. They never said that the compiler itself will do the transition from modal DOS into event driven GUI. You can compile a large clipper application but the problem lies on the GUI interface. As we already know, windows is an event driven environment. Therefore porting a large DOS application would be somewhat tricky.

You should avoid begin sequence... break... end sequence block in GUI, though that is possible too and tricky as well. If your code is not so modular then that will be another problem.

Another option for you is to use Clipx or write them again from scratch. You can cut and paste your old code whenever appropriate.

On the otherhand if your clipper code is highly modular porting them is easy. Build the main menu, then layout the Data Entry Form from your DOS Screen. Here, your @ r,c get.... read... they must be converted to TextBox Control, combox, date control, etc.

If you have coded using HMG library before, perhaps you know how you can handle the transition. For sure DOS and GUI is two different things. The instruction pointer will not return to where you are expecting it as in DOS.

I'm sorry if I won't be able to help you.... :(


Regards,

Danny

Re: Using HMG or HMG Extended with xHarbour.com

Posted: Wed May 12, 2010 11:31 am
by Rathinagiri
Fantastic explanation Danny.

Re: Using HMG or HMG Extended with xHarbour.com

Posted: Wed May 12, 2010 11:33 am
by gfilatov
tomfromdare wrote:Anyone:

...
Searching the forums suggests that "hmg extended" can be used with xHarbour, but the README there doesn't mention such a thing. Anyone point me in the best direction to take a large xHarbour.com program and, screen by screen, replace the text screens with GUI?
Hello Tom,

Firstly, please take a look for this (small outdated) archive at
http://tech.groups.yahoo.com/group/harb ... hb6633.zip

Description: HMG Extended Edition (build 79) with xHarbour 1.2.1 (Rev. 6633) and precompiled libraries.
Remark: After extract, you will need of Borland C/C++ 5.5.1 compiler installed at your disk.

Secondly, I recommend you to learn a huge quantity of the distributed samples 8-)

Then you should revise your application and redesign it step by step for GUI using. ;)

P.S. Rathi, sorry for pointing to url at the external minigui forum...

Re: Using HMG or HMG Extended with xHarbour.com

Posted: Wed May 12, 2010 11:47 pm
by tomfromdare
While I really appreciate all 3 prompt replies, I don't think they have addressed the basic question adequately.

I'd like to use the hmg library within the commercial xHarbour.COM environment, which I own and used to convert the large and complex DOS program into a Windows program. Years ago I tested several add-on GUI libs within this environment, and was frustrated with the lack of documentation, the incomplete implementation, or the lack of ongoing development. None of these complaints apply to hmg!

After testing in the installed hmg environment, I got the client's approval to build a GUI login screen and a GUI main menu. Each menu item would then call a freestanding part of the original program. Then I would tackle one menu item at a time, building the GUI then copying and pasting the original business logic in, and testing testing testing.

This approach would match Danny's suggestion, I think. It would also allow us to convert gradually. Still I fear doing the whole process in hmg and leaving the commercial xHarbour environment that went through the extensive acceptance testing. Is there any reason the hmg lib can't be used there, in place of the other incomplete or poorly documented GUI libs? It's also to be noted that they hope to switch from dbf to MySQL use, and I've successfully tested with the xHarbour.com mysql lib.

Thanks,
Tom

Re: Using HMG or HMG Extended with xHarbour.com

Posted: Thu May 13, 2010 1:58 am
by apais
Harbour and xHArbour are diverging more and more each day.
Core quality in Harbour is far superior now than it's commercial clone.
Remove your fears and jump into Harbour.
You won't regret.

Re: Using HMG or HMG Extended with xHarbour.com

Posted: Thu May 13, 2010 2:51 am
by Rathinagiri
apais wrote:Harbour and xHArbour are diverging more and more each day.
Core quality in Harbour is far superior now than it's commercial clone.
Remove your fears and jump into Harbour.
You won't regret.
Salute brother. :)

Re: Using HMG or HMG Extended with xHarbour.com

Posted: Fri May 14, 2010 9:52 pm
by tomfromdare
So what I hear is, no need to stay in the commercial xHarbour.com world, as I can build GUI screens in the hmg environment, then copy and paste the business logic from the working DOS environment.

I'll give that a try soon, and then just want a compatible MySQL lib for when the client loves the GUI version and is ready to leave the DBF world behind.

Thanks, all!

Re: Using HMG or HMG Extended with xHarbour.com

Posted: Sat May 15, 2010 3:26 am
by sudip
Hello Tom,

As an user of both Harbour and xHarbour, I can tell you Harbour is a better choice. :)

Regarding xHarbour, it has also a free version at http://free.xharbour.com/. You may also download latest version of non-commercial xHarbour from http://www.xharbour.org/ But, it doesn't have some good things (eg., SQLite library) with the free version. Moreover, you can't use MingW compiler with xHarbour :(

If you want to transfer your old Clipper Apps to Win32, you may try GTWVT or GTWVG libraries with Harbour. These libraries need very small changes in your existing code. But, you can't have good Windows GUI with these libraries (GTWVG is a better one).

For Win32 apps with REAL Windows GUI, I recommend HMG (Harbour MiniGUI). :D

With best regards.

Sudip

Re: Using HMG or HMG Extended with xHarbour.com

Posted: Sat May 15, 2010 11:26 am
by swapan
tomfromdare wrote:So what I hear is, no need to stay in the commercial xHarbour.com world, as I can build GUI screens in the hmg environment, then copy and paste the business logic from the working DOS environment.

I'll give that a try soon, and then just want a compatible MySQL lib for when the client loves the GUI version and is ready to leave the DBF world behind.

Thanks, all!
I can understand the dilemma you are going through....
Still, you can seriously give a try to your this above-quoted "decision". All the best!
And do come back with your feedback.