Using HMG or HMG Extended with xHarbour.com

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

tomfromdare
Posts: 6
Joined: Mon Dec 15, 2008 4:28 pm

Using HMG or HMG Extended with xHarbour.com

Post 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
User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines

Re: Using HMG or HMG Extended with xHarbour.com

Post 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
Regards,

Danny
Manila, Philippines
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Using HMG or HMG Extended with xHarbour.com

Post by Rathinagiri »

Fantastic explanation Danny.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
gfilatov
Posts: 1116
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: Using HMG or HMG Extended with xHarbour.com

Post 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...
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
tomfromdare
Posts: 6
Joined: Mon Dec 15, 2008 4:28 pm

Re: Using HMG or HMG Extended with xHarbour.com

Post 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
User avatar
apais
Posts: 441
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF, Leto, MariaDB, SQLite
Location: uruguay
Contact:

Re: Using HMG or HMG Extended with xHarbour.com

Post 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.
Angel Pais
Web Apps consultant/architect/developer.
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Using HMG or HMG Extended with xHarbour.com

Post 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. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
tomfromdare
Posts: 6
Joined: Mon Dec 15, 2008 4:28 pm

Re: Using HMG or HMG Extended with xHarbour.com

Post 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!
User avatar
sudip
Posts: 1456
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Using HMG or HMG Extended with xHarbour.com

Post 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
With best regards,
Sudip
User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Re: Using HMG or HMG Extended with xHarbour.com

Post 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.
Thanks & Regards,
Swapan Das

http://www.swapandas.com/
Post Reply