prg code function documentor in HMG

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2060
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,

did HMG Syntax now work with CLICK and "your" Source :?:

---

i have add new Function GetDBFInfo() :D

we do have "Data Path" and we got Tbl_cros.TXT but it only say which DBF is used ... not it's Structure.
now i scan "Data Path" for DBF and "try" to open it an get DBSTRUCT() which just take some Seconds.

"try" mean FOPEN() to read Header of DBF.

Code: Select all

   nHandle := FOPEN( cDbf )
   FSEEK( nHandle, 0, 0 )
   FREAD( nHandle, @cBuffer, 1 )
   FCLOSE( nHandle )
   nType := ASC( cBuffer )
Question : if a DBF is already open how to get "more" Information e.g. "VIA" :?:

Code: Select all

   DO CASE
      CASE nType = 3
         USE (cDBF) VIA "DBFNTX"
      CASE nType = 7
         // MSGInfo( VAR2CHAR( aType ), "Warning DBF Type" )
         USE (cDBF) VIA "DBFNTX"
      CASE nType = 48 .OR. nType = 49
         USE (cDBF) VIA "DBFCDX"
      CASE nType = 131
         USE (cDBF) VIA "DBFNTX"
      CASE nType = 245
         // using Cl*pper Comix/SixDrive
         USE (cDBF) VIA "DBFCDX"
    OTHERWISE
         // MsgInfo("no supportet" ) 
    ENDCASE    

i do have more Type but i don't know if i need it under harbour / HMG :?:
FUNCTION _DbfFileType( nType, cDbf )

CASE nType = 2 // 02h FoxBASE
CASE nType = 3 // 03h FoxBASE+/Dbase III plus, no memo
CASE nType = 4 //* 04h
CASE nType = 5 //* 05h
CASE nType = 7 //* 07h
CASE nType = 48 // 30h Visual FoxPro
CASE nType = 49 // 31h Visual FoxPro, autoincrement enabled
CASE nType = 67 // 43h dBASE IV SQL table files, no memo
CASE nType = 99 // ???
CASE nType = 123 //* 7Bh
CASE nType = 131 // 83h FoxBASE+/dBASE III PLUS, with memo
CASE nType = 135 //* 87h
CASE nType = 139 // 8Bh
CASE nType = 142 //* 8Eh
CASE nType = 179 //* B3h
CASE nType = 203 // 0xCB dBASE IV SQL table files, with memo
CASE nType = 229 //* E5h HiPer-Six format with SMT memo file
CASE nType = 245 // F5h FoxPro 2.x (or earlier) with memo
CASE nType = 251 // FBh FoxBASE
so here CLICK.EXE v0.22 (packed with UPX)
Source will follow soon
hb_CLICK_EXE22.zip
(1.37 MiB) Downloaded 399 times
have fun
Jimmy
RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: prg code function documentor in HMG

Post by RPC »

Hi AUGE_OHR
Tried ver 22. In one of the files got error msg "Control Underflow 1: Error detected at line 204"
This file was not re-formatted in clickout folder.
Compiling my program however does not produce any error.
User avatar
AUGE_OHR
Posts: 2060
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,

thx for Answer,

the Error Message is about "your" Code but i don't know what is in "your" line 204.
if VERBOSE=ON you can see last Line of "Input" Window (middle) what is in line 204

i guess it is a END xxx so i need to know what xxx is which i have not implement yet.
so please help me and give me a Hint what DEFINE xxx is still missing, thx.
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2060
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,

it seems i still have not include many DEFINE as i have not use it yet like
DEFINE DATEPICKER
DEFINE EDITBOX
DEFINE HYPERLINK
DEFINE IMAGE
DEFINE LABEL
DEFINE LISTBOX
DEFINE ACTIVEX
DEFINE ANIMATEBOX
DEFINE BROWSE
DEFINE CHECKBOX
DEFINE CHECKBUTTON
DEFINE COMBOBOX
DEFINE CONTEXTMENU
DEFINE DROPDOWN
DEFINE FRAME
DEFINE IPADDRESS
DEFINE MONTHCALENDAR
DEFINE PLAYER
DEFINE PROGRESSBAR
DEFINE SLIDER
DEFINE SPINNER
DEFINE SPLITBOX
DEFINE TAB
DEFINE TEXTBOX
DEFINE TIMEPICKER
DEFINE TIMER
there are some Sample which can make Probem
DEFINE TREE
possible Problem while no DEFINE
NODE 'Docs'
TREEITEM 'Docs 1' IMAGES {'varios'}
END NODE
DEFINE REPORT
possible Problem with BEGIN

BEGIN DATA
END DATA

BEGIN LAYOUT
END LAYOUT

BEGIN HEADER
END HEADER

BEGIN DETAIL
END DETAIL

BEGIN FOOTER
END FOOTER

BEGIN SUMMARY
END SUMMARY

BEGIN GROUP
BEGIN GROUPHEADER
END GROUPHEADER
BEGIN GROUPFOOTER
END GROUPFOOTER
END GROUP

END REPORT
so if someone have a DEFINE TREE or DEFINE REPORT please check if CLICK work with that Syntax, thx
have fun
Jimmy
RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: prg code function documentor in HMG

Post by RPC »

AUGE_OHR wrote: Sun Jan 12, 2020 8:55 pm hi,

thx for Answer,

the Error Message is about "your" Code but i don't know what is in "your" line 204.
if VERBOSE=ON you can see last Line of "Input" Window (middle) what is in line 204

i guess it is a END xxx so i need to know what xxx is which i have not implement yet.
so please help me and give me a Hint what DEFINE xxx is still missing, thx.
Hi AUGE_OHR
Its ENDIF at line no 204
User avatar
AUGE_OHR
Posts: 2060
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,

here EXE v.0.23 which include all DEFINE i have post before.
hb_CLICK_EXE23.zip
(1.37 MiB) Downloaded 459 times
if you still get a Error please send me a Notice which END xxx of DEFINE xxx is not include

Code: Select all

   DEFINE xxx // i need THIS
      ...
   END xxx // i need THIS
   ...
ENDIF  <- Error      
have fun
Jimmy
RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: prg code function documentor in HMG

Post by RPC »

Hi AUGE_OHR
I am still getting error.

I have used commands

IF
...
START PRINTPAGE
...
END PRINTPAGE
ELSE
...
ENDIF // line no 204

Another error , which was in earlier version, also is inspite of having sub-dir \clickout i get error msg about \clickout not existing and if I select it to create , i get another error msg regarding directory cannot be created and then the program runs normally.
User avatar
AUGE_OHR
Posts: 2060
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 14, 2020 7:49 am

Code: Select all

   START PRINTPAGE 
   ...
   END PRINTPAGE
Aha ...this i have oversee.ok i will fix it
RPC wrote:Another error , which was in earlier version, also is inspite of having sub-dir \clickout i get error msg about \clickout not existing and if I select it to create , i get another error msg regarding directory cannot be created and then the program runs normally.
YES ...

Code: Select all

   IF !isdir( cOutDir )
      IF verify( 'The output directory "' + cOutDir + '" does not exist.', ;
                 .t., 'Create', 'Abort' )
         ft_mkdir( cOutDir )
      ELSE
         QUIT
      ENDIF
   ENDIF
i have to check my Function ISDIR() in Xbase.PRG
thx for help
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2060
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 have check my Function ISDIR() but i can't reproduce Error any more :o

Code: Select all

FUNCTION ISDIR( cIn )
LOCAL aDir  := DIRECTORY( cIn, "D" )
LOCAL i, iMax
LOCAL nPosi, cDir, lRet := .F.

   iMax := LEN( aDir )
   nPosi := RAT( "\", cIn )
   IF nPosi > 0
      cDir := SUBSTR( cIn, nPosi + 1 )
      FOR i := 1 TO iMax
         IF aDir[ i ] [ 1 ] = cDir .AND. "D" $ aDir[ i ] [ 5 ]
            lRet := .T.
            EXIT
         ENDIF
      NEXT
   ENDIF
RETURN lRet
so i can only give some Hint

delete old "OutPut" Folder and let CLICK create new
try Name of "OutPut" Folder with / without "\" at End

---

did someone find more Problem :?:
does it work well enough now to release Source Code :?:
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2060
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,

here now "Release Candidate 1".
hb_CLICK_EXE25.zip
(1.37 MiB) Downloaded 448 times
i don't use FMG File any more and have create a new Icon for Click (Darkmode ...)
if i don't get any more Error Message i will freeze this Version an Release Source Code on Sunday.
have fun
Jimmy
Post Reply