Page 1 of 3
HMG 2.6.6
Posted: Fri Sep 26, 2008 1:45 am
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.
Re: HMG 2.6.6
Posted: Fri Sep 26, 2008 4:21 am
by Rathinagiri
Nice enhancement. Thank you Roberto.
Re: HMG 2.6.6
Posted: Wed Oct 01, 2008 12:02 pm
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
Re: HMG 2.6.6
Posted: Wed Oct 01, 2008 2:08 pm
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
Re: HMG 2.6.6
Posted: Wed Oct 01, 2008 3:01 pm
by luisvasquezcl
Hi,
Is this problem will be solved or we will have to modify all the programs?
Regards,
Luis Vásquez.
Re: HMG 2.6.6
Posted: Wed Oct 01, 2008 4:44 pm
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,
Re: HMG 2.6.6
Posted: Wed Oct 01, 2008 6:30 pm
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
Re: HMG 2.6.6
Posted: Wed Oct 01, 2008 7:18 pm
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.
Re: HMG 2.6.6
Posted: Wed Oct 01, 2008 7:25 pm
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.
Re: HMG 2.6.6
Posted: Wed Oct 01, 2008 7:38 pm
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:
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.