HMG 2.6.6

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

Moderator: Rathinagiri

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

HMG 2.6.6

Post by Roberto Lopez »


English:


- Fixed: Error in documentation. Reported by Grigory Filatov.

- Fixed: Another problem in print preview introduced in 2.6.2.
Reported by Grigory Filatov.

- Fixed: Semi-oop syntax for containers. Tab, ToolBar and SplitBox
child controls can be (optionally) referred as follows:

ToolBar Buttons:

Window.ToolBar.Button

Tab child controls:

Window.Tab(nPage).Control

SplitBox child controls ('SplitBox' name is automatically assigned):

Window.SplitBox.Control

When a ToolBar is in a SplitBox, the syntax is as follows:

Window.SplitBox.ToolBar.Button

Samples: \hmg\samples\containers.

Español:

- Solucionado: Error en la documentación. Reportado por Grigory Filatov.

- Solucionado: Otro problema en la vista previa de impresión introducido
en la versión 2.6.2. Reportado por Grigory Filatov.

- Solucionado: Sintaxis semi-oop para contenedores. Los controles
pertenecientes a un Tab, SplitBox o ToolBar pueden ser referidos
(opcionalmente) según se indica a continuación:

Botones de ToolBar:

Window.ToolBar.Button

Controles en Tab:

Window.Tab(nPage).Control

Controles en SplitBox (El nombre 'SplitBox' es asignado
automáticamente):

Window.SplitBox.Control

Cuando un ToolBar está en un SplitBox, la sintaxis es:

Window.SplitBox.ToolBar.Button

Ejemplos: \hmg\samples\containers.
Regards/Saludos,

Roberto


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

Re: HMG 2.6.6

Post by Rathinagiri »

Nice enhancement. Thank you Roberto.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG 2.6.6

Post by mol »

I have reached an Error in situation like this:
I have defined window:

Define Window OknoUstawienia

and later, if I want to read "row" value:

xpos := OknoUstawienia.row
I get error:
Error BASE/1003 Zmienna nie istnieje: _OKNOUSTAWIENIA_ROW
^^^^^^^variable does not exist.... ^^^^^^^^^^^^^
Called from GETCONTROLTYPE(871)

Called from GETPROPERTY(6864)

It worked up to ver. hmg 2.6.4
I tried GetProperty:
GetProperty("OknoUstawienia","ROW")
and it works properly...

What's going on?


Best regards, Marek "MOL", Poland
User avatar
gfilatov
Posts: 1057
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: HMG 2.6.6

Post by gfilatov »

mol wrote:I have reached an Error in situation like this:
I have defined window:

Define Window OknoUstawienia

and later, if I want to read "row" value:

xpos := OknoUstawienia.row
I get error:
Error BASE/1003 Zmienna nie istnieje: _OKNOUSTAWIENIA_ROW
^^^^^^^variable does not exist.... ^^^^^^^^^^^^^
Called from GETCONTROLTYPE(871)

Called from GETPROPERTY(6864)

It worked up to ver. hmg 2.6.4
I tried GetProperty:
GetProperty("OknoUstawienia","ROW")
and it works properly...

What's going on?
Hi Marek,

There are a semi-oop changes introduced since hmg 2.6.5.

Tip: to add a brackets for your semi-oop declaration OknoUstawienia.row,
f.e. ( OknoUstawienia.row )

But I don't confirm a such problem for the following sample:

Code: Select all

/*
* MiniGUI This Demo
* (c) 2003 Roberto Lopez
*/

#include "minigui.ch"

Function Main

	DEFINE WINDOW Form_1 ;
		AT 0,0 ;
		WIDTH 400 ;
		HEIGHT 200 ;
		TITLE 'This Demo' ;
		MAIN ;
		ON INIT This.Title := 'New Title (From This)'

		@ 10,10 BUTTON Button_1 ;
			CAPTION 'Hi!!!' ;
			ACTION ThisTest() ;
			TOOLTIP 'Test Tip'

	END WINDOW

	CENTER WINDOW Form_1

	ACTIVATE WINDOW Form_1

Return

Procedure ThisTest()

	ThisWindow.Row := 10
	ThisWindow.Col := 10

	MsgInfo ( str(Form_1.Row)+str(Form_1.Col) , This.Name )  // this line without error

	MsgInfo ( This.Caption )

	This.Hide

	MsgInfo (This.Name)

	MsgInfo ( This.ToolTip )

	This.Show

Return
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
luisvasquezcl
Posts: 1258
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: HMG 2.6.6

Post by luisvasquezcl »

Hi,
Is this problem will be solved or we will have to modify all the programs?
Regards,
Luis Vásquez.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 2.6.6

Post by Roberto Lopez »

mol wrote:I have reached an Error in situation like this:
I have defined window:

Define Window OknoUstawienia

and later, if I want to read "row" value:

xpos := OknoUstawienia.row
I get error:
Error BASE/1003 Zmienna nie istnieje: _OKNOUSTAWIENIA_ROW
^^^^^^^variable does not exist.... ^^^^^^^^^^^^^
Called from GETCONTROLTYPE(871)

Called from GETPROPERTY(6864)

It worked up to ver. hmg 2.6.4
I tried GetProperty:
GetProperty("OknoUstawienia","ROW")
and it works properly...

What's going on?

Best regards, Marek "MOL", Poland
Mol, Grigory, Luis:

The changes made in 2.6.5 should be backwards compatible, if not, it is an error and I'll try to fix it.

Please send a complete sample showing the problem, since, the row property for windows is working for me, so, I can't confirm (or try to fix) a bug.

Thanks.

Regards,
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
gfilatov
Posts: 1057
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: HMG 2.6.6

Post by gfilatov »

Roberto Lopez wrote: Mol, Grigory, Luis:

The changes made in 2.6.5 should be backwards compatible, if not, it is an error and I'll try to fix it.

Please send a complete sample showing the problem, since, the row property for windows is working for me, so, I can't confirm (or try to fix) a bug.

Thanks.
Roberto,

Try the following sample at the folder samples\containers\toolbar:

Code: Select all

/*
 * MINIGUI - Harbour Win32 GUI library Demo
 *
 * Copyright 2002 Roberto Lopez <harbourminigui@gmail.com>
 * http://harbourminigui.googlepages.com/
*/

#include "minigui.ch"

Function Main

	DEFINE WINDOW Form_0 ;
		AT 0,0 ;
		WIDTH 640 HEIGHT 480 ;
		TITLE 'MiniGUI ToolBar Demo' ;
		ICON 'DEMO.ICO' ;
		MAIN ;
		FONT 'Arial' SIZE 10 

		ON KEY F2 ACTION MsgInfo('F2 (Main)')

		DEFINE STATUSBAR
			STATUSITEM 'HMG Power Ready!' 
		END STATUSBAR

		DEFINE MAIN MENU 
			POPUP '&File'
				ITEM '&Disable ToolBar Button'	ACTION Form_0.Toolbar_1.Button_1.Enabled := .F. 
				ITEM '&Enable ToolBar Button'	ACTION Form_0.Toolbar_1.Button_1.Enabled :=  .T. 
				SEPARATOR
				ITEM 'Get ToolBar Button Caption' ACTION MsgInfo( Form_0.Toolbar_1.Button_1.Caption) 
				SEPARATOR
				ITEM 'Set ToolBar Button Caption' ACTION SetProperty ( 'Form_0' , 'ToolBar_1' , 'Button_1' , 'Caption' , 'New New' ) 
				SEPARATOR
				ITEM '&Exit'			ACTION Form_0.Release
			END POPUP
			POPUP '&Help'
				ITEM '&About'		ACTION MsgInfo ("MiniGUI ToolBar demo") 
			END POPUP
		END MENU

		DEFINE TOOLBAR ToolBar_1 BUTTONSIZE 85,85 FLAT BORDER 

			BUTTON Button_1 ;
			CAPTION '&More ToolBars...' ;
			PICTURE 'button1.bmp' ;
			ACTION Modal_Click()  TOOLTIP 'ONE'

			BUTTON Button_2 ;
			CAPTION '&Button 2' ;
			PICTURE 'button2.bmp' ;
			ACTION MsgInfo('Click! 2')  TOOLTIP 'TWO'

			BUTTON Button_3 ;
			CAPTION 'Button &3' ;
			PICTURE 'button3.bmp' ;
			ACTION MsgInfo('Click! 3')  TOOLTIP 'THREE'

		END TOOLBAR

	END WINDOW

	Form_0.Toolbar_1.Col := Form_0.Width - Form_0.Toolbar_1.Width - 15  // this problem string

	CENTER WINDOW Form_0

	ACTIVATE WINDOW Form_0

Return Nil

*-----------------------------------------------------------------------------*
Procedure Modal_CLick
*-----------------------------------------------------------------------------*

	DEFINE WINDOW Form_2 ;
		AT 0,0 ;
		WIDTH 400 HEIGHT 300 ;
		TITLE 'ToolBar Test'  ;
		MODAL NOSIZE 

		ON KEY F2 ACTION MsgInfo('F2 (Child)')
		ON KEY F10 ACTION MsgInfo('F10 (Child)')

		DEFINE TOOLBAR ToolBar_1 FLAT BUTTONSIZE 100,30 BOTTOM RIGHTTEXT 

			BUTTON Button_1 ;
			CAPTION '&Undo' ;
			PICTURE 'button4.bmp' ;
			ACTION MsgInfo('UnDo Click!') 

			BUTTON Button_2 ;
			CAPTION '&Save' ;
			PICTURE 'button5.bmp' ;
			ACTION MsgInfo('Save Click!') 

			BUTTON Button_3 ;
			CAPTION '&Close' ;
			PICTURE 'button6.bmp' ;
			ACTION Form_2.Release

		END TOOLBAR

	END WINDOW

	Form_2.Center

	Form_2.Activate

Return Nil
and you have got this error message:
Harbour MiniGui Errorlog File

------------------------------------
Date:10/01/08 Time: 21:22:45
Error BASE/1003 Variable does not exist: _FORM_0_WIDTH
Called from GETCONTROLTYPE(871)
Called from GETPROPERTY(6864)
Called from MAIN(63)
But the following sample works properly (after adding parentheses):

Code: Select all

/*
 * MINIGUI - Harbour Win32 GUI library Demo
 *
 * Copyright 2002 Roberto Lopez <harbourminigui@gmail.com>
 * http://harbourminigui.googlepages.com/
*/

#include "minigui.ch"

Function Main

	DEFINE WINDOW Form_0 ;
		AT 0,0 ;
		WIDTH 640 HEIGHT 480 ;
		TITLE 'MiniGUI ToolBar Demo' ;
		ICON 'DEMO.ICO' ;
		MAIN ;
		FONT 'Arial' SIZE 10 

		ON KEY F2 ACTION MsgInfo('F2 (Main)')

		DEFINE STATUSBAR
			STATUSITEM 'HMG Power Ready!' 
		END STATUSBAR

		DEFINE MAIN MENU 
			POPUP '&File'
				ITEM '&Disable ToolBar Button'	ACTION Form_0.Toolbar_1.Button_1.Enabled := .F. 
				ITEM '&Enable ToolBar Button'	ACTION Form_0.Toolbar_1.Button_1.Enabled :=  .T. 
				SEPARATOR
				ITEM 'Get ToolBar Button Caption' ACTION MsgInfo( Form_0.Toolbar_1.Button_1.Caption) 
				SEPARATOR
				ITEM 'Set ToolBar Button Caption' ACTION SetProperty ( 'Form_0' , 'ToolBar_1' , 'Button_1' , 'Caption' , 'New New' ) 
				SEPARATOR
				ITEM '&Exit'			ACTION Form_0.Release
			END POPUP
			POPUP '&Help'
				ITEM '&About'		ACTION MsgInfo ("MiniGUI ToolBar demo") 
			END POPUP
		END MENU

		DEFINE TOOLBAR ToolBar_1 BUTTONSIZE 85,85 FLAT BORDER 

			BUTTON Button_1 ;
			CAPTION '&More ToolBars...' ;
			PICTURE 'button1.bmp' ;
			ACTION Modal_Click()  TOOLTIP 'ONE'

			BUTTON Button_2 ;
			CAPTION '&Button 2' ;
			PICTURE 'button2.bmp' ;
			ACTION MsgInfo('Click! 2')  TOOLTIP 'TWO'

			BUTTON Button_3 ;
			CAPTION 'Button &3' ;
			PICTURE 'button3.bmp' ;
			ACTION MsgInfo('Click! 3')  TOOLTIP 'THREE'

		END TOOLBAR

	END WINDOW

	Form_0.Toolbar_1.Col := Form_0.Width - ( Form_0.Toolbar_1.Width ) - 15

	CENTER WINDOW Form_0

	ACTIVATE WINDOW Form_0

Return Nil

*-----------------------------------------------------------------------------*
Procedure Modal_CLick
*-----------------------------------------------------------------------------*

	DEFINE WINDOW Form_2 ;
		AT 0,0 ;
		WIDTH 400 HEIGHT 300 ;
		TITLE 'ToolBar Test'  ;
		MODAL NOSIZE 

		ON KEY F2 ACTION MsgInfo('F2 (Child)')
		ON KEY F10 ACTION MsgInfo('F10 (Child)')

		DEFINE TOOLBAR ToolBar_1 FLAT BUTTONSIZE 100,30 BOTTOM RIGHTTEXT 

			BUTTON Button_1 ;
			CAPTION '&Undo' ;
			PICTURE 'button4.bmp' ;
			ACTION MsgInfo('UnDo Click!') 

			BUTTON Button_2 ;
			CAPTION '&Save' ;
			PICTURE 'button5.bmp' ;
			ACTION MsgInfo('Save Click!') 

			BUTTON Button_3 ;
			CAPTION '&Close' ;
			PICTURE 'button6.bmp' ;
			ACTION Form_2.Release

		END TOOLBAR

	END WINDOW

	Form_2.Center

	Form_2.Activate

Return Nil
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 2.6.6

Post by Roberto Lopez »

gfilatov wrote:
Try the following sample at the folder samples\containers\toolbar:

Code: Select all


	Form_0.Toolbar_1.Col := Form_0.Width - Form_0.Toolbar_1.Width - 15  // this problem string

Return Nil
Grigory:

The expression: "Form_0.Toolbar_1.Col" has no sense, since ToolBar control has not a 'Col' property.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 2.6.6

Post by Roberto Lopez »

Roberto Lopez wrote:
gfilatov wrote:
Try the following sample at the folder samples\containers\toolbar:

Code: Select all


	Form_0.Toolbar_1.Col := Form_0.Width - Form_0.Toolbar_1.Width - 15  // this problem string

Return Nil
Grigory:

The expression: "Form_0.Toolbar_1.Col" has no sense, since ToolBar control has not a 'Col' property.

Regards,

Roberto.
If in the same program, at the same place you put the following code:

Code: Select all


	nTest := Form_0.Row 
	MsgInfo ( Str(nTest) )

It is working, retrieving correctly the row property value.

This is because I've requested to MOL a complete sample showing the problem and (if it exists) fix it.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 2.6.6

Post by Roberto Lopez »

Roberto Lopez wrote: If in the same program, at the same place you put the following code:

Code: Select all


	nTest := Form_0.Row 
	MsgInfo ( Str(nTest) )

It is working, retrieving correctly the row property value.

This is because I've requested to MOL a complete sample showing the problem and (if it exists) fix it.

Regards,

Roberto.
Finally:

Again, in the same sample, at the same place, if you paste the following:

Code: Select all

	Form_0.row := form_0.row - 50
You'll obtain a compile (not runtime) error, but it has nothing to do with 2.6.5 changes.

You could test with 2.0.032 and obtain the same syntax error, that you can avoid using parenthesis.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply