HMG 3.0.21

HMG announcements; Latest HMG-related news, releases, fixes and updates.

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

HMG 3.0.21

Post by Roberto Lopez »

- HMG 3.0.21 Changelog:

English:
--------

- Fixed: build.bat incorrect in various samples.

- Fixed: Misc. data-bound Grid problems: Filtered and conditional
indexed tables, SQLMIX and POSTGRE RDD locking bugs and some other
minor bugs. Thanks to raumi75, Mol and Vanguarda for reports on
problems.

- Fixed: Problem with Player control. Reported by Vanguarda.

- New: GRID.31, GRID.32 samples.

- Updated: HFCL. Contributed by Rathinagiri.


Español:
--------

- Solucionado: 'build.bat' incorrecto en varios ejemplos.

- Solucionado: Varios problemas en Grid: Tablas filtradas y con
índices condicionales, bloqueo con SQLMIX y POSTGRE y varios bugs menores.
Gracias a Raumi75, Mol y Vanguarda por los reportes.

- Solucionado: Problema con el control Player. Reportado por Vanguarda.

- Nuevo: Ejemplos GRID.31 y GRID.32.

- Actualizado: HFCL. Gracias a Rathinagiri.

Download / Descarga: www.hmgforum.com/site
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: HMG 3.0.21

Post by Vanguarda »

Hi friends,

Thanks Master for this new version

My best regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG 3.0.21

Post by esgici »

Thanks a lot Maestro :)

Best Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
raumi75
Posts: 135
Joined: Wed Dec 17, 2008 2:31 am
Location: Lünen, Germany
Contact:

Re: HMG 3.0.21

Post by raumi75 »

Thank you Roberto for the new release.

I tested the new Samples GRID.31 and GRID.32 and I am not sure, if the behaviour is intentional.

GRID.31 (SET DELETED Test)
I select the first row and click chose "RecNo" from the menu. Message: 1
I select the second row (Value 3, because row 2 is deleted). Recno is 3
I select the third row (Value 5, because row 4 is deleted). Recno IS 3 ALSO!
The Rows with the value 7 and 9 are both Recno 5.
The Rows with the value 10 and 11 are both Recno 7.

That was the sample without any modifications.

When I change the sample to SET DELETED OFF, the deleted rows are greyed out. Nice! I like that. The Recno-Function works right, when deleted is off.

Sample GRID.32 also gives wrong RecNos.



I tried to change the Sample to allow editing, but now got the error:

GRID: Editing filtered / condidtional indexed tables is not allowed. Program terminated

This error makes it a lot clearer, why the program misbehaves.
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.21

Post by Roberto Lopez »

raumi75 wrote:Thank you Roberto for the new release.

I tested the new Samples GRID.31 and GRID.32 and I am not sure, if the behaviour is intentional.

GRID.31 (SET DELETED Test)
I select the first row and click chose "RecNo" from the menu. Message: 1
I select the second row (Value 3, because row 2 is deleted). Recno is 3
I select the third row (Value 5, because row 4 is deleted). Recno IS 3 ALSO!
The Rows with the value 7 and 9 are both Recno 5.
The Rows with the value 10 and 11 are both Recno 7.

That was the sample without any modifications.

When I change the sample to SET DELETED OFF, the deleted rows are greyed out. Nice! I like that. The Recno-Function works right, when deleted is off.

Sample GRID.32 also gives wrong RecNos.

I tried to change the Sample to allow editing, but now got the error:

GRID: Editing filtered / condidtional indexed tables is not allowed. Program terminated

This error makes it a lot clearer, why the program misbehaves.
You are right.

I've discovered the problem many hours after publishing.

It's already fixed.

The fix will be included in the next release.

Here is it. You must replace the following functions in h_grid.prg and recompile the library.

Code: Select all

***********
function setdatagridrecno ( i , nRecNo  )
***

Local cRecordSource := ''
Local aValue
Local nLogicalPos := 0
Local j := 1

	cRecordSource	:= _HMG_SYSDATA [ 40 ] [ i ] [ 10 ]

	nBakReNo	:= &cRecordSource->(RecNo())

	aValue := _GetValue (  ,  ,  i )

	if ( empty ( &cRecordSource->( dbFilter () ) ) ) .and. ( .Not. Set ( _SET_DELETED ) )

		&cRecordSource->( dbGoTo ( nRecNo ) )
		nLogicalPos := &cRecordSource->( OrdKeyNo () )

	else

		MsgMiniGuiError("GRID: Set RecNo property not allowed for filtered tables. Program terminated" )

	endif

	&cRecordSource->( DbGoTo ( nBakReNo ) )

	_SetValue (  ,  ,  {  nLogicalPos , aValue [2] } , i )

	DataGridRefresh(i)

return nil

***********
function getdatagridrecno(i)
***

Local cRecordSource := ''
Local nItemCount
Local nHandle
Local aColumnFields := {}
Local lRet := .T.
Local j
Local aValue
Local nLogicalPos
Local nRecNo
Local nTopIndex
Local nBakReNo

	cRecordSource	:= _HMG_SYSDATA [ 40 ] [ i ] [ 10 ]

	aColumnFields	:= _HMG_SYSDATA [ 40 ] [ i ] [ 11 ]

	nHandle		:= _HMG_SYSDATA [ 3 ] [ i ] 

	nBakReNo	:= &cRecordSource->(RecNo())

	aValue := _GetValue (  ,  ,  i )


	if ( empty ( &cRecordSource->( dbFilter () ) ) ) .and. ( .Not. Set ( _SET_DELETED ) )

		&cRecordSource->( OrdKeyGoTo ( aValue[1] ) )

	else

		&cRecordSource->( dbGoTop() )

		&cRecordSource->( dbSkip( aValue[1] - 1 ) )

	endif

	nRecNo := &cRecordSource->(RecNo())

	&cRecordSource->( DbGoTo ( nBakReNo ) )

return nRecNo
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5481
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 3.0.21

Post by Rathinagiri »

Thanks Roberto.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
raumi75
Posts: 135
Joined: Wed Dec 17, 2008 2:31 am
Location: Lünen, Germany
Contact:

Re: HMG 3.0.21

Post by raumi75 »

Thank you. I replaced the functions and now it works.

Raumi
User avatar
sudip
Posts: 1456
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: HMG 3.0.21

Post by sudip »

Thanks a lot Roberto for this version :)
It works fine. It takes 2/3 seconds only to open a large .dbf table with 522,813 records using my Celeron 1.66 laptop with 760mb ram and XP SP2. It's really very good :) I used following code for testing:

Code: Select all

#include <hmg.ch>

Function Main

   local mTable :=  GetFile ( { {'DBF Files','*.DBF'} } , "Select DBF File"), mAlias := ""
   local aFldnm := {}, aWidth := {}, aStruct := {}
   

   if empty(mTable)
      return nil
   endif
   use &mTable
   mAlias := alias()
   aStruct := dbstruct()
   for i = 1 to len(aStruct)
      aadd(aFldnm, aStruct[i, 1])
      aadd(aWidth, aStruct[i, 3]*10)
   next
   
   define window main at 0, 0 width 500 height 500 title mTable main

   	@ 10,10 GRID Grid_1 ;
			WIDTH 470 ;
			HEIGHT 440 ;
			HEADERS aFldnm ;
			WIDTHS aWidth;
			VALUE { 1 , 1 } ;
			ROWSOURCE mAlias ;
			COLUMNFIELDS aFldnm 
            
   end window
 
  Main.Center
  Main.Activate

Return
With best regards.
Sudip
With best regards,
Sudip
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: HMG 3.0.21

Post by Vanguarda »

Hello my friends,

Roberto, i´ve a little doubt about activeX control.

I´ve a little project that i did for tests (is attached in this post).
Well, in this project i have a main ("Main.FMG") window with a button that call another window ("Test.FMG") that have a activex control. When a close the second window ("Test.FMG") i got error message of windows OS. When i not have the error on close the Test.FMG window, i click on the button of my MAIN window for call the second window again, so i got the same error again. Please, so kind, see the image bellow.

My doubt is: I can´t call a window with activeX control defined more than one time?!

I´ve use Windows 7 Ultimate version with theme Aero Default.

PS: Sorry for disturbing, and sorry my bad english.

With kind regards,
Attachments
ActiveX.JPG
ActiveX.JPG (54.36 KiB) Viewed 4845 times
Test_ActiveX.rar
(584.54 KiB) Downloaded 313 times
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: HMG 3.0.21

Post by Vanguarda »

Hi friends,

Roberto, i´ve a little wishe for HMG IDE.

When us added a new module (.PRG) the same is created like this:

Code: Select all

#include <hmg.ch>

Function Main

        Load Window Main
        Main.Center
        Main.Activate

Return
Exist some way for add new module function, create a new module with this initial lines?

Code: Select all

*============================================================
* Program......: <Name of program>
* Programmer...:
* Created at...: <currently date> / <currently time>
* Finished at...: 
*============================================================
*Description:
*============================================================
#include <hmg.ch>

Function Main

        Load Window Main
        Main.Center
        Main.Activate

Return
Please, it is a little wishe. If i say stupid things, let me know, ok?! :)

My best regards,

PS: Sorry my bad english
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
Post Reply