HMG 3.4.3

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

galanuy
Posts: 2
Joined: Fri Jun 28, 2013 2:42 pm
Location: Montevideo, Uruguay

Help for IDE and Harbour options

Post by galanuy »

Dears
I think I have a problem I can solve varying same HARBOUR options.
I use the IDE and don't know how I can do it.
Someone can guide me?
Thank you very much
zorpavns
Posts: 22
Joined: Tue Apr 23, 2013 10:43 am
DBs Used: DBF, SQL
Location: Novi Sad, Serbia

Re: HMG 3.4.3

Post by zorpavns »

It should help me

You need to find information in the database and display it in a grid . I find the fact that grid do not go on that information .
Here's an example

if mes->(Dbseek(Alltrim(cLocalSearchString)))
msginfo(mes->(Recno())) This report 740
msginfo(mes_1.Grid_1.Value) This report 1 1

mes_1.Grid_1.Value := {mes -> (RECNO ()),1}
msginfo(mes_1.Grid_1.Value) This report 100 1 and should 740 1
mes_1.Grid_1.Refresh
msginfo(mes_1.Grid_1.Value) This report 100 1 and should 740 1
else
msginfo("Nema podatka za dati kriterujum "+cPublicSearchString)

if len(cPublicSearchString)-1>0
cPublicSearchString:=Substr( cPublicSearchString,1,len(cPublicSearchString)-1 )
if mes->(Dbseek(Alltrim(cPublicSearchString)))
mes_1.Grid_1.Value := {mes -> (RECNO ()),1}
endif
else
mes_1.Grid_1.Value := {1,1}
mes->(Dbgotop())
endif
endif


Show me where I'm wrong . Thanks in advance
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: HMG 3.4.3

Post by dragancesu »

zorpavns
Posts: 22
Joined: Tue Apr 23, 2013 10:43 am
DBs Used: DBF, SQL
Location: Novi Sad, Serbia

Re: HMG 3.4.3

Post by zorpavns »

Search and problems
When it comes to browse command everything is working properly searches go to the desired style. When used with the data grid from a set everything works as it should also go to the desired style. But when using data from the database grid will not go to the selected track is already behaving as I wrote in a previous message .

Thank in advance
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG 3.4.3

Post by mol »

Did somebody observe memory leak in applications built with HMG 3.4.3?
My new client works on Windows XP and after 2 hours of works application slows down. Memory usage still grows...
User avatar
luisvasquezcl
Posts: 1258
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: HMG 3.4.3

Post by luisvasquezcl »

Dear,
some time this problem with the instruction MEMORY RELEASE solved.
It can be implemented with a timer. for example:

DEFINE TIMER INTERVAL 1000 Main timer_1 OF ACTION (RELEASE MEMORY)

I hope you will help.
best regards
Luis Vasquez

Estimado,
hace un tiempo se solucionó este problema con la instrucción RELEASE MEMORY.
se puede implementar con un timer. por ejemplo:

DEFINE TIMER Timer_1 OF Main INTERVAL 1000 ACTION ( RELEASE MEMORY )

espero te sea de ayuda.
saludos cordiales
Luis Vasquez
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG 3.4.3

Post by mol »

Thank you Luis for pointing! I've missed this. I'll try this solution.
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: HMG 3.4.3

Post by dragancesu »

I tried version 3.4.3 on windows 10 64bit and encountered the problem, trying to make a compilation of 64-bit application
How to tell the compiler to produce 32-bit application?
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: HMG 3.4.3

Post by mustafa »

Hola Luis:
Fabuloso tu solución
estoy experimentando con ACTIVEX WMPlayer.OCX.7 que mediante
una lista tocan las canciones seguidas.

Con RELEASE MEMORY
De CPU ->20 % e pasado 18,4 % como máximo
De Memoria -> 60,1 MB a Memoria 4,6 MB

El INTERVAL 1000, si se incrementa disminuye la Memoria ?
Hay muy poca diferencia Compilando a 32 bits o a 64 bits.
Saludos

*-------------------------------------------------------------------------*
Hello Luis:
Fabulous your solution
I'm experimenting with ACTIVEX WMPlayer.OCX.7 that by
a list play the songs in a row.

With RELEASE MEMORY
CPU -> 20% and 18.4% maximum passed
Memory -> 60.1 MB to 4.6 MB Memory

The INTERVAL 1000, if it increases decreases memory?
There is little difference Compiling 32 bits or 64 bits.
Regards

Mustafa
KDJ
Posts: 243
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland

Re: HMG 3.4.3

Post by KDJ »

Hi all forum members. I'm new user.
I would like to thank the authors and the contributors for great HMG tools.

-----
mol wrote:Did somebody observe memory leak in applications built with HMG 3.4.3?
My new client works on Windows XP and after 2 hours of works application slows down. Memory usage still grows...
I confirm this. On Win-XP memory usage is growing very quickly.
And "RELEASE MEMORY" is not helpful.
Please check it with a simple test program:

Code: Select all

// MemoryUsageTest.prg
// Move mouse within main window or resize window and keep an eye on memory usage at status bar

#include 'hmg.ch'


FUNCTION Main()

  SET FONT TO 'MS Shell Dlg', 8

  DEFINE WINDOW MUT_WM;
    MAIN;
    ROW    100;
    COL    200;
    WIDTH  500;
    HEIGHT 400;
    TITLE 'Memory usage test';
    ON MOUSEMOVE MUT_WM_MouseMove();
    ON SIZE      MUT_WM_Size();
    ON MAXIMIZE  MUT_WM_Size()

    DEFINE BUTTON Action_BU
      COL    10
      HEIGHT 25
      CAPTION 'Action'
      ACTION MsgInfo('Action button was pressed.')
    END BUTTON

    DEFINE BUTTON Exit_BU
      HEIGHT 25
      CAPTION 'Exit'
      ACTION MUT_WM.RELEASE
    END BUTTON

    DEFINE STATUSBAR
      STATUSITEM ''
      STATUSITEM '' WIDTH 150
    END STATUSBAR

    DEFINE TIMER MUT_WM_TI;
      INTERVAL 500;
      ACTION ReleaseMemory()
  END WINDOW //MUT_WM

  MUT_WM_Size()
  MUT_WM.ACTIVATE

RETURN NIL


FUNCTION MUT_WM_MouseMove()

  MUT_WM.STATUSBAR.Item(2) := 'Mouse pos: ' + LTrim(Str(_HMG_SYSDATA[192])) + ',' + LTrim(Str(_HMG_SYSDATA[191]))

RETURN NIL


FUNCTION MUT_WM_Size()

  MUT_WM.Action_BU.ROW   := MUT_WM.CLIENTAREAHEIGHT - GetWindowHeight(MUT_WM.STATUSBAR.HANDLE) - MUT_WM.Action_BU.HEIGHT - 10
  MUT_WM.Action_BU.WIDTH := Round((MUT_WM.CLIENTAREAWIDTH - 30) / 2, 0)

  MUT_WM.Exit_BU.ROW   := MUT_WM.Action_BU.ROW
  MUT_WM.Exit_BU.COL   := MUT_WM.Action_BU.WIDTH + 20
  MUT_WM.Exit_BU.WIDTH := MUT_WM.Action_BU.WIDTH

RETURN NIL


FUNCTION ReleaseMemory()

  MUT_WM.STATUSBAR.Item(1) := 'Memory usage: ' + LTrim(Str(GetProcessMemoryInfo()[3] / 1024, 10, 0) + ' KB')
  RELEASE MEMORY

RETURN NIL
Post Reply