prg code function documentor in HMG

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 2095
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: prg code function documentor in HMG

Post by AUGE_OHR »

hi,

so here is the Source Code for HMG CLICK v2.05.29
hb_CLICK_20529.ZIP
(67.37 KiB) Downloaded 433 times
i'm doing my best but i can't guarantee that produce Code is free of Error :!:
even when CLICK does not find a Error and it compile / link it is still possible that "something" have change.

so make BACKUP from *.PRG before you override it with Code produced by CLICK :!:

---

about ";"
it seem that "Keyword" like "End" or "Return" can be "lost" when have ";" before.
so write "End" or "Return" in next line so CLICK will be not confuse to "forget" it :o

it work without "+" when using

Code: Select all

.AND. ;
.OR. ;
it work with long String and "+" in next line but more safe (for CLICK) when using "+ ;" at End of line

Code: Select all

BEGIN xxx
i have only test BEGIN INI
hope other are used in *.RMG which CLICK do not touch

---

small BUG with STATUSITEM with are not Intend

Code: Select all

      DEFINE STATUSBAR ..
   STATUSITEM ..
---

for MiniGUI User :
you have to delete some line where MiniGUI IDE found a Error.
also all HMG_* are not working when have "MINIGUI.CH" instead of "HMG.CH"

i do change Button ACTION after create.

Code: Select all

_HMG_SYSDATA[ 6 ] [ nIndex ] := { || DoEsc() }
_HMG_SYSDATA[ 6 ] [ nIndex ] := { || DoExit() }
_HMG_SYSDATA[ 6 ] [ nIndex ] := { || StartClick() }
if someone found a MiniGUI Solution please also post it here in "this" Forum.

! Note : MiniGUI IDE create a Name.INI where Name = 1st PRG -> CLICK.INI ... :roll:
so for MiniGUI so have to rename CLICK.PRG into CLICK2.PRG :!:

---

feel free to modify Source.
if you someone find a nice Solution please post it here in "this" Forum, thx
have fun
Jimmy
User avatar
quartz565
Posts: 670
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Contact:

Re: prg code function documentor in HMG

Post by quartz565 »

Thank you again Jimmy!
I'll try the new version

Nikos
Best Regards,
Nikos.

os: Windows Server 2019 - 64
RPC
Posts: 308
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: prg code function documentor in HMG

Post by RPC »

Hi AUGE_OHR
Thanks for v 2.05.29 and source code.
When I try to compile it I get error msg as per follo SS
Click20529 error msg.png
Click20529 error msg.png (1.05 MiB) Viewed 24636 times
I am unable to tell what is the exact error.
Can you please look into it
Thanks
User avatar
AUGE_OHR
Posts: 2095
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: prg code function documentor in HMG

Post by AUGE_OHR »

hi,

i can't see youe full Modul List but i guess CLICK.PRG is NOT declare as "Main"
MakeMain.JPG
MakeMain.JPG (58.59 KiB) Viewed 24629 times
in IDE "somewhere" i saw a Option ...
other Way was to delete CLICK.PRG from Modul List and Import it again.

---

my Way is to click on *.HBP.
1st time Windows will ask how to open file and i point to

Code: Select all

c:\hmg.3.4.4\IDE\IDE.exe
and let Windows "remember"

next time when click on *.HBP it will open Project in IDE and i just press F5
have fun
Jimmy
RPC
Posts: 308
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: prg code function documentor in HMG

Post by RPC »

Hi AUGE_OHR
Ok. Got it.
There is no \res sub dir and no clickBW32.ico file in it.
I put a dummy icon after creating \res directory and now it compiles !
Please upload clickBW32.ico file so that I can incorporate in the compiled program.

Secondly I am curious why the error mentions it as HMG 3.4.3 stable(32 bit) instead of HMG 3.4.4 which I am using to compile ?
User avatar
AUGE_OHR
Posts: 2095
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: prg code function documentor in HMG

Post by AUGE_OHR »

RPC wrote: Tue Jan 21, 2020 10:56 am Hi AUGE_OHR
my Name is Jimmy
RPC wrote: Tue Jan 21, 2020 10:56 am Ok. Got it.
There is no \res sub dir and no clickBW32.ico file in it.
I put a dummy icon after creating \res directory and now it compiles !
uuups ... forgot \RES
Click_Res.JPG
Click_Res.JPG (28 KiB) Viewed 24592 times
so delete Icon and use your own Icon but it must called
MYMAIN ICON YourResource.ICO
RPC wrote: Tue Jan 21, 2020 10:56 am Secondly I am curious why the error mentions it as HMG 3.4.3 stable(32 bit) instead of HMG 3.4.4 which I am using to compile ?
no Idea
have fun
Jimmy
RPC
Posts: 308
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: prg code function documentor in HMG

Post by RPC »

Hi Jimmy
I got confused, your DP mentions it as AUGE_OHR so I was addressing you accordingly.
Henceforth I will call you Jimmy.
Yes I got a different icon instead of your icon.

I think the second icon is redundant, it doesn't seem to be used anywhere.
User avatar
AUGE_OHR
Posts: 2095
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: prg code function documentor in HMG

Post by AUGE_OHR »

hi,

this is the Clipper Source to get IndexKey() from NTX without load DBF.
INDDUMP.ZIP
(3.76 KiB) Downloaded 812 times
it use low level and read at byte 22
i have made some test and it seem still work after 20 year :D
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2095
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: prg code function documentor in HMG

Post by AUGE_OHR »

hi,

i do have a Problem with HMG Source Syntax and Logic of CLICK

c:\hmg.3.4.4\SOURCE\H_GRID.PRG

Code: Select all

1017 IF AEC = 'EDITBOX'

      DEFINE WINDOW _HMG_GRID_InplaceEdit AT 0, 0 ;
                 WIDTH 350 ;
                 HEIGHT 350 + IF( IsAppThemed(), 3, 0 ) ;
                 TITLE _HMG_SYSDATA[ 7 ] [ idx ] [ ci ] ;
                 MODAL ;
                 NOSIZE ;
                 SHORTTITLEBAR

      ELSE

         DEFINE WINDOW _HMG_GRID_InplaceEdit AT r + DR, c + DC ;
                    WIDTH This.CellWidth + DW ;
                    HEIGHT This.CellHeight + 6 + DH ;
                    TITLE '' ;
                    MODAL NOSIZE NOCAPTION

         ENDIF
c:\hmg.3.4.4\SOURCE\h_controlmisc.prg

Code: Select all

3437 IF nR + nH > GetDeskTopRealHeight()
      nDiff := nR + nH - GetDeskTopRealHeight()
      // nR := nR - nDiff
      DEFINE WINDOW _InputWindow AT nR, nC WIDTH nW HEIGHT( nH - nDiff ) ;
                 VIRTUAL HEIGHT nH VIRTUAL WIDTH nW + 20 ;
                 TITLE cTitle MODAL NOSIZE BackColor aBackColor ON RELEASE _InputWindowOnRelease(OldScrollStep, aHotKeys )

         SET SCROLLSTEP TO 20
      ELSE
         DEFINE WINDOW _InputWindow AT nR, nC WIDTH nW HEIGHT nH ;
                 TITLE cTitle MODAL NOSIZE BackColor aBackColor ON RELEASE _InputWindowOnRelease( OldScrollStep, aHotKeys )
         ENDIF
there is a DEFINE but no ENDxxx before ELSE or ENDIF ... hm

so i have change 2 lines in CLICK
NOT to use "DEFINE WINDOW" to indent
search for "Jimmy 20200921" in new CLICK.PRG

here changed Code
--- deleted ---

here working full Source Code (only PRG) v2.05.34
hb_CLICK_20534.ZIP
(64.7 KiB) Downloaded 836 times

p.s.
when work with c:\hmg.3.4.4\SOURCE\*.PRG (no Subfolder) it need some small modification.
i will open extra Thread
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2095
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: prg code function documentor in HMG

Post by AUGE_OHR »

hi,

Modification in v2.05.34 for HMG \Source work but it look not nice with "normal" Syntax.

So I add option in CLICK whether to indent DEFINE WINDOW or not
DEF_WIN.JPG
DEF_WIN.JPG (12.28 KiB) Viewed 31901 times
Upgrade is just CLICK.PRG so you need last full Version.
CLICK20535.ZIP
(26 KiB) Downloaded 890 times
have fun
Jimmy
Post Reply