HMG 2.6.6

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

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 3880
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 107 times

HMG 2.6.6

Post by Roberto Lopez » Fri Sep 26, 2008 1:45 am


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: 5096
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 93 times
Been thanked: 107 times
Contact:

Post by Rathinagiri » Fri Sep 26, 2008 4:21 am

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: 2742
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 91 times
Been thanked: 32 times
Contact:

Post by mol » Wed Oct 01, 2008 12:02 pm

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: 502
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Has thanked: 5 times
Been thanked: 32 times
Contact:

Post by gfilatov » Wed Oct 01, 2008 2:08 pm

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: 996
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Has thanked: 5 times
Been thanked: 10 times
Contact:

Post by luisvasquezcl » Wed Oct 01, 2008 3:01 pm

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: 3880
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 107 times

Post by Roberto Lopez » Wed Oct 01, 2008 4:44 pm

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: 502
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Has thanked: 5 times
Been thanked: 32 times
Contact:

Post by gfilatov » Wed Oct 01, 2008 6:30 pm

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: 3880
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 107 times

Post by Roberto Lopez » Wed Oct 01, 2008 7:18 pm

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: 3880
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 107 times

Post by Roberto Lopez » Wed Oct 01, 2008 7:25 pm

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: 3880
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 107 times

Post by Roberto Lopez » Wed Oct 01, 2008 7:38 pm

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

Who is online

Users browsing this forum: No registered users and 1 guest