prg code function documentor in HMG

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 943
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 145 times
Been thanked: 242 times

Re: prg code function documentor in HMG

Post by AUGE_OHR »

edk wrote:
Tue Dec 10, 2019 11:12 am
I changed the control type from EDITBOX to RICHEDITBOX and used the Addtext property.
Every 250 lines displayed, release memory and do event queue.
click_prg.7z
Check it now.
YES ... it is much Quicker and Memory is stable, THX

Code: Select all

      	RELEASE MEMORY
      	Do EVENTS
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 943
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 145 times
Been thanked: 242 times

Post by AUGE_OHR »

have work on Click GUI Version.

Code: Select all

FUNCTION CutLine( cIn )
LOCAL cOut   := ""
LOCAL i, iMax
LOCAL nLines := 10

iMax := MlCount( cIn, 80 )
IF iMax > nLines
   FOR i := iMax - nLines TO iMax
      cOut += TRIM( MemoLine( cIn, 80, i ) ) + CRLF
   NEXT
ELSE
   cOut := cIn + CRLF
ENDIF
RETURN cOut
as "OutPut" is a String i can use MEMO Function.
all "OutPut" Window have same Size and limited to 10 Lines.

---

i have try Cutline() with FiveWin and it work fine with "hole" String
same i try with HMG but again it begin to slow down :(

i have NO Memory Problem while also use shown Technic by EDK :D

Code: Select all

   SetProperty( "ClickForm", "ProgressBar_1", "Value", nPcntDone * 2 )
   RELEASE MEMORY
   Do EVENTS
now i use

Code: Select all

PUBLIC cStatusBox := ""
PUBLIC cInBox     := ""
PUBLIC cOutBox    := ""

PROCEDURE SetStatusText( cData )
      cStatusBox += cData + CRLF
      SetProperty("ClickForm","StatusBox","Value", CutLine(cStatusBox)  )
PROCEDURE show_in( cData )
      cInBox += cData + CRLF
      SetProperty("ClickForm","InBox","Value", cInBox := CutLine(cInBox)  )
PROCEDURE show_out( cData, cColor )
      cOutBox += cData + CRLF
      SetProperty("ClickForm","OutBox","Value", cOutBox := CutLine(cOutBox)  )
Text for StatusBox is small so i do not assign it
Text for InBox / OutBox now can have max 10 Lines so it is Quick

---

have add TextBox for "Input"/"Output" of Source/Target but not finish yet.
HMG_GUI_CLICK.jpg
HMG_GUI_CLICK.jpg (63.34 KiB) Viewed 1462 times
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 943
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 145 times
Been thanked: 242 times

Post by AUGE_OHR »

hi,

got it run in GUI Mode with different Directory for Source / Target
HMG_GUI_CLICK_Release.jpg
HMG_GUI_CLICK_Release.jpg (59.68 KiB) Viewed 1413 times
after Start CLICK.EXE it will create CLICK.INI
i have change to RUNMODE=S87 and VERBOSE=YES
if you want it Quick use VERBOSE=NO

so here is CLICK.EXE
HMG_CLICK_GUI.zip
(1.29 MiB) Downloaded 46 times
let me some time to clean up Code which is not need any more under GUI.
have fun
Jimmy

User avatar
dragancesu
Posts: 792
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 30 times
Been thanked: 229 times

Post by dragancesu »

Nice work but manz false alarm

Control Underflow: Error detected at line 52

User avatar
AUGE_OHR
Posts: 943
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 145 times
Been thanked: 242 times

Post by AUGE_OHR »

hi,

it is for Cl*pper Code so HMG Syntax is not implement (yet)
i have not change Concept only make GUI Version and enhance Code to use "In"/"Out" Directory.

---

i can use Click Source and run CLICK.EXE while HMG Syntax is in *.FMG Files.
i don't know if it is possible to enhance CLICK Concept to use HMG Syntax :idea:

---

it also can make Problem when have

Code: Select all

RUNMODE=5.X
so please change it to

Code: Select all

RUNMODE=S87
in CLICK.INI

i also use in CLICK.INI

Code: Select all

ALIGN_CLASS_IN_THE_ALIGNER=NO
remember i use "Original" Cl*pper Code so it is for "Classy" Style which have i not test with harbour Style yet.

let me some time to clean up Code, than we can see if we can do "more" to use it with harbour / HMG Syntax

---

when copy to USB-Stick i got this Anti-Virus Message
Click_No_Virus.jpg
Click_No_Virus.jpg (39.08 KiB) Viewed 1400 times
perhaps it is while i have used UPX.EXE :?:

it is NOT a VIRUS :!:
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 943
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 145 times
Been thanked: 242 times

Post by AUGE_OHR »

hi,

now i have clean up Click Code to use for GUI Mode :D
some Function i have deleted as they are not used in GUI Mode

as i say this is a Cl*pper Code Formatter which does not know #xCommand Syntax like HMG use. :!:

it is the next Step we can do now but i need working HMG Sample that fail with CLICK.EXE.
so please try CLICK and send me some small(!) Sample. i will try to find a Concept.

--- how to ---

unpack all to a Folder, start IDE and load CLICK.HBP

! Note : if you have a old CLICK.HBP delete PRB_STAK.PRG from Filelist
also CLICK.hbc is not need any more.

when CLICK.EXE start 1st time it will create CLICK.INI
CASE_OF_COMMANDS=UPPER
CASE_OF_FUNCTIONS=UPPER
CASE_OF_BOOLEAN=UPPER

INDENT_FUNCTIONS=YES
INDENT_DO_CASE=YES
INDENT_LOCALS=NO

VERBOSE=YES

RUNMODE=S87
ALIGN_CLASS_IN_THE_ALIGNER=NO

If you want it QUICK without Output use

Code: Select all

VERBOSE=NO
using RUNMODE=S87 will automatic disable PREPROCESS_WITH_DECLARATION_BUSTER

Option ALIGN_CLASS_IN_THE_ALIGNER is for Classy Style so you have to check if it work with harbour Style

so run CLICK on Click Source Code and tell me how long it take on "your" PC
HB_CLICK_SOURCE.zip
(63.04 KiB) Downloaded 55 times
todo : DBF Table and Index still report from CLICK.EXE Folder ... (might be in different Directory than Source )
have fun
Jimmy

Red2
Posts: 93
Joined: Sat May 18, 2019 2:11 pm
DBs Used: DBF, FoxPro, Visual FoxPro
Location: United States (East Coast)
Has thanked: 34 times
Been thanked: 6 times

Post by Red2 »

Hi Jimmy,

Thank you for considerable efforts here and elsewhere. I really appreciate it.

On "my" PC (i3-7100 CPU @ 3.90Hz):
Processed 20 files, containing 9280 lines of source code
Time in process: 40 Seconds

I did notice one thing in file "Fnc_cros.txt". CLICK.EXE chops file names off after 8 characters:
"main_Btn_Check_Files_Action.prg" was represented there as "main_btn_che"

Please keep up the good work!

Thanks again,
Red2

User avatar
AUGE_OHR
Posts: 943
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 145 times
Been thanked: 242 times

Post by AUGE_OHR »

Red2 wrote:
Wed Jan 01, 2020 9:43 pm
On "my" PC (i3-7100 CPU @ 3.90Hz):
Processed 20 files, containing 9280 lines of source code
Time in process: 40 Seconds
that is about the same i got.

funny if you disable MT it take double time ...
Question : what does MT /VM have to do with Grafic :idea:
Red2 wrote: I did notice one thing in file "Fnc_cros.txt". CLICK.EXE chops file names off after 8 characters:
"main_Btn_Check_Files_Action.prg" was represented there as "main_btn_che"
AH, yes ... old DOS 8.3 Style.
OK, thanks for Report i will look for it.
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 943
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 145 times
Been thanked: 242 times

Post by AUGE_OHR »

hi,

i have try to use LABEL instead of RICHEDITBOX for "Output"
instead of 40 Sec. it take 1.40 (!) ... :shock:

if you want to try it FMG here with LABEL
hb_ClickForm.zip
(1.25 KiB) Downloaded 41 times
Tip : move Original *.FMG to "safe Place" to restore it later

---

it is still a Huge Difference using VERBOSE=YES / NO

while LABEL Time is about same when using MT=NO i like to ask if RICHEDITBOX is "accelerate" by MT=ON :?:
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 943
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 145 times
Been thanked: 242 times

Post by AUGE_OHR »

hi,

now i have run CLICK on other PC with FX-8350 4.2GHz, NVidea GT1030 and it take 1:27 ... with/without MT :o
it have only a SSD but as we know with Verbose=NO i take just < 5 Sec. so i doesn't matter.

other (Mini) PC is a Skylake i5-6500 3.2-3.6 Ghz with Intel HD530 but on that PC it is much faster with MT=YES (40 Sec.)
so what do i "need" to use MT to "accelerate" GPU :idea:
have fun
Jimmy

Post Reply