HMG 3.1.2

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

User avatar
srvet_claudio
Posts: 2044
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 35 times
Been thanked: 147 times
Contact:

Re: HMG 3.1.2 (Test)

Post by srvet_claudio » Mon Apr 08, 2013 1:03 pm

mol wrote:I've found some problems with hmg 3.1.2 and context and main menu:
When you open one modal window from another, error occures:

Code: Select all

Main Menu already defined in Window: OknoHistoriaKontrahenta. Program Terminated
Called from _DEFINEMAINMENU(61) 
or

Code: Select all

Error BASE/1070 Illegal argument: ==
Called from OBSLBLEDU(952) 
Called from (b)MAIN(447) 
Called from ISCONTEXTMENUDEFINED(638) 
Called from _DEFINECONTEXTMENU(496) 
Called from SZYBKATABELATOWAROW(33) 
Besides - context menu is not defined in line 33:
SZYBKATABELATOWAROW(33)
but, in FMG file loaded by function SZYBKATABELATOWAROW()
(piece of FMG file below)

Code: Select all


    DEFINE CONTEXT MENU
        MENUITEM "Popraw Towar" ACTION PoprawDodajTowar(.f.) NAME PoprawDodajTowar
        MENUITEM "Drukuj etykietę na regał" ACTION ZaznaczTowarDoDrukuEtykiety(0,towary->towar, cEtykietaNaRegal,1) NAME ZaznaczTowarDoDrukuEtykiety
        MENUITEM "Drukuj etykietę na towar" ACTION ZaznaczTowarDoDrukuEtykiety(1,towary->towar, cEtykietaNaTowar,-1,towary->Ilosc) NAME cEtykietaNaRegal
    END MENU

All this code works perfect with hmg 3.0.46
Please Marek, post a small example.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
mol
Posts: 3253
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 235 times
Been thanked: 132 times
Contact:

Post by mol » Mon Apr 08, 2013 4:00 pm

I've tried to reproduce these errors on small sample, but without success :-)
My application works good on hmg 3.0.46, but all errors appear when compiled with hmg3.1.2.
It's strange...

User avatar
srvet_claudio
Posts: 2044
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 35 times
Been thanked: 147 times
Contact:

Post by srvet_claudio » Mon Apr 08, 2013 7:24 pm

mol wrote:I've tried to reproduce these errors on small sample, but without success :-)
My application works good on hmg 3.0.46, but all errors appear when compiled with hmg3.1.2.
It's strange...
Hi Marek.

I also tried to play the bug in HMG.3.1.2, but I failed.
Maybe this is not a bug, in this version I added the function ISxxxMENUDEFINED() in the definition of the menus to prevent multiple definitions of the same menu.

The following code compiles fine in HMG.3.0.46 (and HMG.3.1.1) but not in HMG.3.1.2

Code: Select all

#include "hmg.ch"

Function main()

   DEFINE WINDOW Form_1 ;
      AT 0,0 ;
      WIDTH 400 ;
      HEIGHT 200 ;
      TITLE 'Multiple definitions of the same menu' ;
      MAIN 

//--------------------------------------------------------------//
      DEFINE MAIN MENU
         POPUP 'Test' 
            ITEM 'Item 1'  ACTION MsgInfo ('Item 1')
            ITEM 'Item 2'  ACTION MsgInfo ('Item 2')
         END POPUP
      END MENU

      DEFINE CONTEXT MENU
         ITEM 'Item 1'  ACTION MsgInfo ('Item 1') 
         ITEM 'Item 2'  ACTION MsgInfo ('Item 2')
      END MENU

//--------------------------------------------------------------//
      DEFINE MAIN MENU
         POPUP 'Test' 
            ITEM 'Item 1'  ACTION MsgInfo ('Item 1')
            ITEM 'Item 2'  ACTION MsgInfo ('Item 2')
         END POPUP
      END MENU

      DEFINE CONTEXT MENU
         ITEM 'Item 1'  ACTION MsgInfo ('Item 1') 
         ITEM 'Item 2'  ACTION MsgInfo ('Item 2')
      END MENU
//--------------------------------------------------------------//
      
   END WINDOW

   CENTER WINDOW Form_1

   ACTIVATE WINDOW Form_1

Return

Best regards,
Claudio.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
mol
Posts: 3253
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 235 times
Been thanked: 132 times
Contact:

Post by mol » Mon Apr 08, 2013 7:38 pm

This error occurs when I tried call one modal window from another modal window. When it was callad from main window, everything worked OK.
I do not define windows manually - they are loaded from fmg files.

Maybe here is the problem. I'll try tomorrow morning to test this path.

User avatar
mol
Posts: 3253
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 235 times
Been thanked: 132 times
Contact:

Post by mol » Tue Apr 09, 2013 6:27 am

I've prepared simple sample. Try to compile it.
First, press button "Load Modal Window #1" on Main Form, then try to load or define Window #2.
Error occurs.
When you press "Load Modal Window #2" on Main Form - everything works OK.

When you remove ONCHANGE phrase from Browse control, everything works OK.

This problem is caused by evaluating code blocks while loading or defining windows, I think.

Regards, Marek
Attachments
hmg312_error.zip
(39.07 KiB) Downloaded 115 times

User avatar
srvet_claudio
Posts: 2044
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 35 times
Been thanked: 147 times
Contact:

Post by srvet_claudio » Tue Apr 09, 2013 11:30 am

mol wrote:I've prepared simple sample. Try to compile it.
First, press button "Load Modal Window #1" on Main Form, then try to load or define Window #2.
Error occurs.
When you press "Load Modal Window #2" on Main Form - everything works OK.

When you remove ONCHANGE phrase from Browse control, everything works OK.

This problem is caused by evaluating code blocks while loading or defining windows, I think.

Regards, Marek
Thanks Marek, I will investigate the problem.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Tue Apr 09, 2013 2:26 pm

Dear Rathinagiri,

I am still without your return my questions of these:
Pablo César wrote:Dear Rathinagiri, thank you for this new release but basically in this version are applied modifications of UNICODE adjustments but regarding Build.bat in samples, Build.bat at HMG main folder, ComboSearchBox, AutoAdjust sample/library and QHTM library have It been included or not yet ?
Please also note to update in next release, version.txt file was not updated. In this last one version.txt should contains "3.1.2 (Test 2013-04-04)".
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines
Been thanked: 2 times

Post by dhaine_adp » Tue Apr 09, 2013 9:21 pm

Hi,

I rebuild HMG Lib 3.1.2 with ANSI only by putting a comment to SET_COMPILE_HMG_UNICODE.ch and execute buildalllib.bat

1. I created another folder and named it as c:\hmg-ansi
2. I copied the contents of HMG 3.1.2 folder and put them to c:\hmg-ansi
3. I edit hmg.ini and put c:\hmg-ansi
4. Put comment marker on //#define COMPILE_HMG_UNICODE
5. At the command prompt inside the c:\hmg-ansi I typed: buildalllib > result.txt
6. I modified my projects .hbc and point everything to c:\hmg-ansi

When I compile the application I've got errors as shown below:

Did I miss something? It seems like during the rebuilding process the compiler didn't pick-up the missing reference (undefined reference) from #else block of #ifdef...#else...#endif of <hmgdir>\source\unicode_string.prg

Please test if you can duplicate the problem on Windows XP Pro SP2.

Also the redirected result.zip (result.txt) file attached (from command line) generated looks like a unicode text file format. Looks funny on ASCII editor and in notepad++ reached about 8000+ lines.
hbmk2: Warning: Non-portable output filename: '-oppcmembers-ansi.exe'. Delete
'.exe' extension.
Harbour 3.2.0dev (r1303181903)
Copyright (c) 1999-2013, http://harbour-project.org/
C:/hmg-ansi/lib/libhmg.a(h_controlmisc.o):h_controlmisc.c:(.data+0x28): undefined reference to `HB_FUN_HMG_UPPER'
C:/hmg-ansi/lib/libhmg.a(h_controlmisc.o):h_controlmisc.c:(.data+0x208): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_windows.o):h_windows.c:(.data+0x38): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_windows.o):h_windows.c:(.data+0x10e8): undefined reference to `HB_FUN_HMG_UPPER'
C:/hmg-ansi/lib/libhmg.a(h_status.o):h_status.c:(.data+0x48): undefined reference to `HB_FUN_HMG_UPPER'
C:/hmg-ansi/lib/libhmg.a(h_status.o):h_status.c:(.data+0x58): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_toolbar.o):h_toolbar.c:(.data+0x128): undefined reference to `HB_FUN_HMG_UPPER'
C:/hmg-ansi/lib/libhmg.a(h_menu.o):h_menu.c:(.data+0x2c8): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_dialogs.o):h_dialogs.c:(.data+0xb8): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_hotkey.o):h_hotkey.c:(.data+0x68): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_label.o):h_label.c:(.data+0x108): undefined reference to `HB_FUN_HMG_LOWER'
C:/hmg-ansi/lib/libhmg.a(h_button.o):h_button.c:(.data+0x158): undefined reference to `HB_FUN_HMG_UPPER'
C:/hmg-ansi/lib/libhmg.a(h_textbox.o):h_textbox.c:(.data+0x148): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_textbox.o):h_textbox.c:(.data+0x228): undefined reference to `HB_FUN_HMG_LOWER'
C:/hmg-ansi/lib/libhmg.a(h_textbox.o):h_textbox.c:(.data+0x2b8): undefined reference to `HB_FUN_HMG_UPPER'
C:/hmg-ansi/lib/libhmg.a(h_combo.o):h_combo.c:(.data+0x78): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_checkbox.o):h_checkbox.c:(.data+0x148): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_browse.o):h_browse.c:(.data+0xa8): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_browse.o):h_browse.c:(.data+0x948): undefined reference to `HB_FUN_HMG_UPPER'
C:/hmg-ansi/lib/libhmg.a(h_tab.o):h_tab.c:(.data+0x58): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_tab.o):h_tab.c:(.data+0x128): undefined reference to `HB_FUN_HMG_UPPER'
C:/hmg-ansi/lib/libhmg.a(h_radio.o):h_radio.c:(.data+0xe8): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_tree.o):h_tree.c:(.data+0xd8): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_grid.o):h_grid.c:(.data+0x68): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_grid.o):h_grid.c:(.data+0xb8): undefined reference to `HB_FUN_HMG_UPPER'
C:/hmg-ansi/lib/libhmg.a(h_font.o):h_font.c:(.data+0xb8): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libhmg.a(h_timer.o):h_timer.c:(.data+0xa8): undefined reference to `HB_FUN_HMG_UPPER'
C:/hmg-ansi/lib/libgraph.a(h_graph.o):h_graph.c:(.data+0x118): undefined reference to `HB_FUN_HMG_LEN'
C:/hmg-ansi/lib/libini.a(h_ini.o):h_ini.c:(.data+0x1f8): undefined reference to `HB_FUN_HMG_LEN'
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1
gcc.exe C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/ppcmembers.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/archive.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/auditdashboard.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/chkinifile.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/classprogressbar.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/codegen.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/datacollection.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/dbfmaketable.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/dialogue.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/exp2excel.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/filemain.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/genclassbrwobj.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/gregcivil.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/makefile.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/nsdlacommfunc.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/ppcmaster.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/recordpicker.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/reports.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/rptpersonalinfo.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/theviewport.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/treeclassview.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/usermgr.o C:/DOCUME~1/Danny/LOCALS~1/Temp/hbmk_0k4uhy.dir/hbmk_xrfeqb.o F:/DAD/members/_temp.o -Wl,--nxcompat -Wl,--dynamicbase -mwindows -Wl,--start-group -lhmg -lcrypt -ledit -leditex -lgraph -lhfcl -lini -lreport -lmsvfw32 -lvfw32 -lhbct -lhbwin -lhbmzip -lminizip -lhbmemio -lhbmisc -lhbmysql -lmysql -lhbtip -lsqlite3 -lhbsqlit3 -lsddodbc -lrddsql -lsddmy -lhbodbc -lodbc32 -lhbhpdf -lhbfimage -lhbpgsql -lhbnetio -lxhb -lpng -llibhpdf -lhbvpdf -lvalleylibs -ldaleaidcommon -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib -Wl,--end-group -o"ppcmembers-ansi.exe" -L"C:/hmg-ansi/harbour/lib/win/mingw" -L"C:/hmg-ansi/lib" -L"c:/hmg-ansi/lib"

hbmk2: Error: Referenced, missing, but unknown function(s): HMG_UPPER(),
HMG_LEN(), HMG_LOWER()
TIA,

Danny
Attachments
result.zip
(2 KiB) Downloaded 90 times
Regards,

Danny
Manila, Philippines

Carlos Britos
Posts: 220
Joined: Sat Aug 02, 2008 5:03 pm
Has thanked: 6 times
Been thanked: 2 times

Post by Carlos Britos » Tue Apr 09, 2013 11:20 pm

dhaine_adp wrote:Hi,

I rebuild HMG Lib 3.1.2 with ANSI only by putting a comment to SET_COMPILE_HMG_UNICODE.ch and execute buildalllib.bat


hbmk2: Error: Referenced, missing, but unknown function(s): HMG_UPPER(),
HMG_LEN(), HMG_LOWER()
Hi.
Maybe is missing in hmg.hbp the file
source/UNICODE_STRING.prg

I don't have3.12 but in 3.11 is missing
Regards/Saludos, Carlos (bcd12a)

User avatar
srvet_claudio
Posts: 2044
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 35 times
Been thanked: 147 times
Contact:

Post by srvet_claudio » Wed Apr 10, 2013 1:29 am

mol wrote:I've prepared simple sample. Try to compile it.
First, press button "Load Modal Window #1" on Main Form, then try to load or define Window #2.
Error occurs.
When you press "Load Modal Window #2" on Main Form - everything works OK.

When you remove ONCHANGE phrase from Browse control, everything works OK.

This problem is caused by evaluating code blocks while loading or defining windows, I think.

Regards, Marek
Hi Marek.

I fixed the problem.
Please replace c:\hmg.3.1.2\source\h_menu.prg for the h_menu.prg attachment file, and rebuild the HMG.

Best regards,
Claudio.
Attachments
h_menu.rar
(3.62 KiB) Downloaded 148 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

Post Reply