Harbour Click! still generating errors

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

HGAutomator
Posts: 188
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF

Harbour Click! still generating errors

Post by HGAutomator »

Hi,

I'm trying to use Click! from a Harbour version provided on the forum a couple of years ago. But I'm still getting errors, after submitting the Click! button.

The popup box returns

Argument error: array assign
[1] = N 10

Called from SHOWACTION(757) in module: CLICK.prg
Called STARTCLICK(995) in module: CLICK.prg
...
Called from MAIN(612) in module: CLICK.prg

, and the ErrorLog.htm says

Date: 11.07.2021 Time: 14:32:30
Application: C:\minigui\MyApps\CLICK\CLICK.exe
User: DESKTOP-Q99999 / User
Time from start: 0 days 0 hours 1 mins 51 secs
Error MGERROR/0 Control: Text_DBF Of ClickForm Not defined. Program terminated.

Date: 11.07.2021 Time: 14:32:32
Application: C:\minigui\MyApps\CLICK\CLICK.exe
User: DESKTOP-Q99999 / User
Time from start: 0 days 0 hours 1 mins 53 secs
Error MGERROR/0 Release a window in its own ON RELEASE procedure or release the Main Window in any ON RELEASE procedure is not allowed. Program terminated.

Date: 18.07.2021 Time: 19:03:04
Application: C:\minigui\myapps\cLICK\CLICK.exe
User: DESKTOP-Q99999 / User
Time from start: 0 days 0 hours 1 mins 30 secs
Error BASE/1069 Argument error: array assign Args: [1] = N 10


Date: 19.10.2021 Time: 09:41:10
Application: C:\minigui\myapps\CLICK\CLICK.exe
User: DESKTOP-Q99999 / User
Time from start: 0 days 0 hours 0 mins 15 secs
Error BASE/1069 Argument error: array assign Args: [1] = N 10

Compilation:

Code: Select all

call ..\..\batch\compile.bat CLICK /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat CMD_LIST /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat DECLBUST /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat ERR_LOG /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat FILNPATH /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat FUNCTRAK /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat JULIAN /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat LIBREAD /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat NICEDATE /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat OBUFREAD /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat OBUFWRIT /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat PRB_AMPM /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat PRB_POP /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat PRB_PROP /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat PROFILE /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat QSORT /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat READLIST /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat READLNK /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat TOKEN /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9
call ..\..\batch\compile.bat XBASE /NL /C %1 %2 %3 %4 %5 %6 %7 %8 %9

call ..\..\batch\compile.bat CLICK /b CMD_LIST /b DECLBUST /b ERR_LOG /b FILNPATH /b FUNCTRAK /b JULIAN /b LIBREAD /b NICEDATE /b OBUFREAD /b OBUFWRIT /b PRB_AMPM /b PRB_POP /b PRB_PROP /b PROFILE /b QSORT /b READLIST /b READLNK /b TOKEN /b XBASE %1 %2 %3 %4 %5 %6 %7 %8 %9
User avatar
AUGE_OHR
Posts: 2064
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Harbour Click! still generating errors

Post by AUGE_OHR »

hi,

i have made CLICK using HMG Syntax which is different to MiniGUI Extended Version

Code: Select all

STATIC PROCEDURE ShowAction( cWho )
LOCAL nIndex := GetControlIndex( "Button_StartClick", "ClickForm" )

   DO CASE
      CASE cWho = "ESC"
         SetProperty( "ClickForm", "Button_StartClick", "Caption", "&Abort" )
         _HMG_SYSDATA[ 6 ] [ nIndex ] := { || DoEsc() }

      CASE cWho = "EXIT"
         SetProperty( "ClickForm", "Button_StartClick", "Caption", "E&xit" )
         _HMG_SYSDATA[ 6 ] [ nIndex ] := { || DoExit() }

      CASE cWho = "CLICK"
         SetProperty( "ClickForm", "Button_StartClick", "Caption", "&Click" )
         _HMG_SYSDATA[ 6 ] [ nIndex ] := { || StartClick() }
   ENDCASE

RETURN
GetControlIndex() might exist but _HMG_SYSDATA is HMG Syntax ... ask Grigory what to use in Extended Version
have fun
Jimmy
HGAutomator
Posts: 188
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF

Re: Harbour Click! still generating errors

Post by HGAutomator »

Auge,

I think the main problem is that I didn't have all the latest files. You had once told me

"sorry, last Files CLICK20535.ZIP and hb_CLICK_20534.ZIP only include *.PRG
use hb_CLICK_20529.ZIP which include *.HBP and override with hb_CLICK_20534.ZIP and last CLICK20535.ZIP"

, but I couldn't locate all of those Zips. I found them now.


However, now the error is some missing resources, e.g.

Error CLICK.rc 1 27: Cannot open file: RES\CLICKBW32.ico.

Do you know where the files are, that are supposed to be in the RES folder?




AUGE_OHR wrote: Thu Sep 08, 2022 12:10 am hi,

i have made CLICK using HMG Syntax which is different to MiniGUI Extended Version

Code: Select all

STATIC PROCEDURE ShowAction( cWho )
LOCAL nIndex := GetControlIndex( "Button_StartClick", "ClickForm" )

   DO CASE
      CASE cWho = "ESC"
         SetProperty( "ClickForm", "Button_StartClick", "Caption", "&Abort" )
         _HMG_SYSDATA[ 6 ] [ nIndex ] := { || DoEsc() }

      CASE cWho = "EXIT"
         SetProperty( "ClickForm", "Button_StartClick", "Caption", "E&xit" )
         _HMG_SYSDATA[ 6 ] [ nIndex ] := { || DoExit() }

      CASE cWho = "CLICK"
         SetProperty( "ClickForm", "Button_StartClick", "Caption", "&Click" )
         _HMG_SYSDATA[ 6 ] [ nIndex ] := { || StartClick() }
   ENDCASE

RETURN
GetControlIndex() might exist but _HMG_SYSDATA is HMG Syntax ... ask Grigory what to use in Extended Version
HGAutomator
Posts: 188
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF

Re: Harbour Click! still generating errors

Post by HGAutomator »

Ok, I have the ico file.

Now, the only thing left is trying to resolve why hbmk2 returns an error running the resource compiler.

I never have this problem with the simple compile.bat batch files that Minigui includes in each of its folders. But for some reasons, hbmk2 is always problematic.
User avatar
AUGE_OHR
Posts: 2064
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Harbour Click! still generating errors

Post by AUGE_OHR »

hi,

also *.RC File are different for MiniGUI Extended Version as i remember.

Code: Select all

#define __VERSION_INFO ""
must be on Top of *.RC

but again :
CLICK is using HMG Syntax and NOT "compatible" to MiniGUI Extended Syntax
so Source Code will produce Error in MiniGUI Environment.

p.s. i never include ICO
have fun
Jimmy
HGAutomator
Posts: 188
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF

Re: Harbour Click! still generating errors

Post by HGAutomator »

Ok, thanks. Unfortunately, it's the same result. Error running resource compiler. This is exactly the same problem from a couple of years ago, that I was never able to resolve. After several weeks, I gave up on click! and continued to use the compile.bat batches for other modules.

Do you know what resource compiler hbmk2.exe is expecting? brcc32.exe is in the PATH.

AUGE_OHR wrote: Thu Sep 08, 2022 12:56 am hi,

also *.RC File are different for MiniGUI Extended Version as i remember.

Code: Select all

#define __VERSION_INFO ""
must be on Top of *.RC

but again :
CLICK is using HMG Syntax and NOT "compatible" to MiniGUI Extended Syntax
so Source Code will produce Error in MiniGUI Environment.

p.s. i never include ICO
HGAutomator
Posts: 188
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF

Re: Harbour Click! still generating errors

Post by HGAutomator »

Wait a minute. Something obvious just occurred to me. Do you have a compiled click.exe executable that runs without major errors?

For the time being, I could avoid trying to configure a Harbour, non-MiniGui environment in order to get it compiled.
User avatar
AUGE_OHR
Posts: 2064
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Harbour Click! still generating errors

Post by AUGE_OHR »

hi,

do you know that MiniGUI Extended Version can use MinGW :?:

so you can try CLICK.HBP and call
x:\minigui\build.bat

Code: Select all

@echo off
set OLDPATH=%PATH%

SET HMGPATH=c:\hmg

SET PATH=%HMGPATH%\harbour\bin;%HMGPATH%\mingw32\bin;%PATH%

SET HMGRPATH=c:\minigui

echo #define HMGRPATH %HMGRPATH%\RESOURCES > _hmg_resconfig.h
type nul > _temp.rc
for %%f in (*.rc) do (
if /i "%%f" NEQ "_temp.rc" (
echo #include "%%f" >> _temp.rc
)
)
echo #include "%HMGRPATH%\resources\hmg.rc" >> _temp.rc

windres -I %HMGRPATH%\include -I %HMGPATH%\mingw32\i686-w64-mingw32\include -i _temp.rc -o _temp.o

rem ***************************************************************************
rem set default run mode
rem ***************************************************************************

set RUN=-run

rem ***************************************************************************
rem If no run after build mode specified add the option to command line.
rem ***************************************************************************

if "%1"=="/n" goto norun
if "%1"=="/N" goto norun

:continue

HBMK2 -strip -fullstatic -D__CALLDLL__ -q %RUN% %1 %2 %3 %4 %5 %6 %7 %8 %HMGRPATH%\minigui.hbc >build.log 2>&1

if errorlevel 1 copy /b build.log error.log >nul

echo.

rem If build error, show 'error.log' ------------------------------------------

if exist error.log type error.log
if exist error.log del build.log

goto endbatch

rem ***************************************************************************
rem Procedure Norun
rem ***************************************************************************

:norun

shift

set RUN=-run-

goto continue

rem ***************************************************************************
rem Delete local variables
rem ***************************************************************************

:endbatch

del _hmg_resconfig.h
del _temp.*

set RUN=
set HMGPATH=
set HMGRPATH=
set PATH=%OLDPATH%
or x:\minigui\build64.bat

Code: Select all

@echo off
set OLDPATH=%PATH%

set HMGPATH=c:
set PATH=%HMGPATH%\harbour64\bin;%HMGPATH%\mingw64\bin;%PATH%

set HMGRPATH=%HMGPATH%\minigui

echo #define HMGRPATH %HMGRPATH%\RESOURCES > _hmg_resconfig.h
type nul > _temp.rc 
for %%f in (*.rc) do ( 
if /i "%%f" NEQ "_temp.rc" ( 
echo #include "%%f" >> _temp.rc 
) 
) 
echo #include "%HMGRPATH%\resources\hmg.rc" >> _temp.rc

windres -I %HMGRPATH%\include -I %HMGPATH%\mingw64\x86_64-w64-mingw32\include -i _temp.rc -o _temp.o

rem ***************************************************************************
rem set default run mode
rem ***************************************************************************

set RUN=-run

rem ***************************************************************************
rem If no run after build mode specified add the option to command line.
rem ***************************************************************************

if "%1"=="/n" goto norun
if "%1"=="/N" goto norun

:continue

hbmk2 -comp=mingw64 -strip -D__CALLDLL__ -q %RUN% %1 %2 %3 %4 %5 %6 %7 %8 %HMGRPATH%\minigui.hbc >build.log 2>&1

if errorlevel 1 copy /b build.log error.log >nul

echo.

rem If build error, show 'error.log' ------------------------------------------

if exist error.log type error.log
if exist error.log del build.log

goto endbatch

rem ***************************************************************************
rem Procedure Norun
rem ***************************************************************************

:norun

shift

set RUN=-run-

goto continue

rem ***************************************************************************
rem Delete local variables
rem ***************************************************************************

:endbatch

del _hmg_resconfig.h
del _temp.*

set RUN=
set HMGPATH=
set HMGRPATH=
set PATH=%OLDPATH%
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2064
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Harbour Click! still generating errors

Post by AUGE_OHR »

HGAutomator wrote: Thu Sep 08, 2022 1:23 am Wait a minute. Something obvious just occurred to me. Do you have a compiled click.exe executable that runs without major errors?
this is the Version i use many Times each Day
CLICK20540_EXE.zip
EXE Only
(1.59 MiB) Downloaded 93 times
have fun
Jimmy
HGAutomator
Posts: 188
Joined: Thu Jul 16, 2020 5:42 pm
DBs Used: DBF

Re: Harbour Click! still generating errors

Post by HGAutomator »

AUGE_OHR,

Thank you, chief. Works perfectly.

I'll figure out the issues with compiling, at leisure. Like you suggested, I might just start fresh with Mingw, and proceed from there.

AUGE_OHR wrote: Thu Sep 08, 2022 1:27 am
HGAutomator wrote: Thu Sep 08, 2022 1:23 am Wait a minute. Something obvious just occurred to me. Do you have a compiled click.exe executable that runs without major errors?
this is the Version i use many Times each Day
CLICK20540_EXE.zip
Post Reply