var declaration

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

var declaration

Post by l3whmg »

Hi guys,
does anyone know if there are problems with PUBLIC, PRIVATE and STATIC declaration with HMG4 (HBQT)?
The use of PRIVATE seems to generate different behaviors; right in HMG3 wrong in HMG4.
Best Regards
Luigi from Italy
www.L3W.it
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: var declaration

Post by Rathinagiri »

Can you give a small sample Luigi?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: var declaration

Post by l3whmg »

Hi Rathi,
I write two example: Hmg3 (rel. 3.0.35) and Hmg4 (I'm using Harbour nightly version and MinGw installed with mingw-get-inst-20101030.exe)

Obviously, these program are similar about HMG but the same with declaration (MEMVAR and PRIVATE).
About HMG4, I rewrite BUTTON command for toolbar (you can retrieve inside Hmg3ToHmg4.ch) because standard HMG4 don't work.

History of my intention: create programmatically the form name and test several call to the same "function".

Programs:
HmgXp000 is the main program; from menu you can call HmgXp002 (standard form)
HmgXp002 is a function with standard form and form name assigned programmatically.
From menu you can call (more than one times) HmgXp003 with TIME() parameter.
This parameter is to know if, every time I call this function, it preserve its value: but don't work. MrDuck suggest me to use class.
HmgXp003 is a function with standard form and form name assigned programmatically.
When you activate (from HmgXp002) you can see the parameter and with button you can show another time.

Results: with HMG3 work fine PRIVATE declaration (not about preserve value, ok)
HMG4 don't show anything! If you uncomment HBQT_ERRORSYS() in Hmg4p000.prg You have surprise (error signal).

The best way for you is try HMG3p... before (to see my intention) than you try HMG4p...

Best regards.
Attachments
Hmg4Test.zip
Hmg4 Version
(3.31 KiB) Downloaded 175 times
Hmg3Test.zip
Hmg3 version
(2.13 KiB) Downloaded 195 times
Luigi from Italy
www.L3W.it
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: var declaration

Post by Rathinagiri »

Thanks a lot Luigi. I will check it out.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply