Page 1 of 2
With a little help from the forum...
Posted: Mon Apr 12, 2010 1:46 pm
by Roberto Lopez
Hi All,
Marek found a problem in 3.0.29 test release, probably related to the new panel type windows, creating a run-time error.
Error: HMG 3.0.29 (2010.04.11)
Non top modal windows can't be released. Program terminated
Please, test it and if you found the problem, try to create a small sample, so I'll be able to solve.
TIA.
Re: With a little help from the forum...
Posted: Mon Apr 12, 2010 1:50 pm
by Rathinagiri
Ok Roberto.
Re: With a little help from the forum...
Posted: Mon Apr 12, 2010 4:16 pm
by esgici
Sorry, its very difficult to reach same error
Only Marek can give some hints
While searching I encounter another things :
Code: Select all
#include <minigui.ch>
PROC Main()
* DECLARE frmSecond, frmThird
DEFINE WINDOW frmMFMain ;
AT 138, 235 ;
WIDTH 550 ;
HEIGHT 350 ;
TITLE "Main Form" ;
MAIN
DEFINE BUTTON Button_1
ROW 40
COL 50
WIDTH 150
HEIGHT 30
ACTION Make2ndForm()
CAPTION "Second Form"
END BUTTON
/*
DEFINE BUTTON Button_2
ROW 60
COL 50
WIDTH 150
HEIGHT 30
ACTION frmSecond.Release
CAPTION "Release Second Form"
END BUTTON
DEFINE BUTTON Button_3
ROW 80
COL 50
WIDTH 150
HEIGHT 30
ACTION frmThird.Release
CAPTION "Release Third Form"
END BUTTON
*/
END WINDOW // frmMFMain
frmMFMain.Activate
Return // Main()
Procedure Make2ndForm()
DEFINE WINDOW frmSecond OF frmMFMain;
AT 50, 50 ;
WIDTH 250 ;
HEIGHT 150 ;
TITLE "Second Form (CHILD)" ;
CHILD
DEFINE BUTTON Button_1
ROW 40
COL 50
WIDTH 150
HEIGHT 30
ACTION Make3thForm()
CAPTION "Make 3th Form"
END BUTTON
DEFINE BUTTON Button_2
ROW 80
COL 50
WIDTH 150
HEIGHT 30
ACTION this.Release
CAPTION "Release this (2nd) window"
AUTOSIZE .T.
END BUTTON
END WINDOW // frmSecond
frmSecond.Activate
Return // Make2ndForm()
PROC Make3thForm()
DEFINE WINDOW frmThird OF frmMFMain;
AT 150, 150 ;
WIDTH 250 ;
HEIGHT 150 ;
TITLE "Third Form (CHILD)" ;
CHILD
DEFINE BUTTON Button_1
ROW 40
COL 50
WIDTH 150
HEIGHT 30
ACTION This.Release
CAPTION "Release THIS (3rd) Form"
END BUTTON
END WINDOW // frmThird
frmThird.Activate
RETU // Make3thForm()
- CHILD windows appears same as PANEL
- When attempting re-define a form after released, an error occurs
I don't know if this two points are important and related to the problem.
Best regards
--
Esgici
Re: With a little help from the forum...
Posted: Mon Apr 12, 2010 5:08 pm
by Roberto Lopez
esgici wrote:Sorry, its very difficult to reach same error
Only Marek can give some hints
While searching I encounter another things :
<...>
- CHILD windows appears same as PANEL
- When attempting re-define a form after released, an error occurs
I don't know if this two points are important and related to the problem.
Well... Panel windows are (almost) child widows with a parent.
So, giving to a child window a parent is (almost) a 'synonymous' for panel.
I've added the panel type, since IMHO, it could be confusing to have two classes of child windows (with and without parent).
So (if I've understood you correctly) this is not really a problem.
Re: With a little help from the forum...
Posted: Mon Apr 12, 2010 5:21 pm
by Roberto Lopez
Roberto Lopez wrote:
Well... Panel windows are (almost) child widows with a parent.
So, giving to a child window a parent is a 'synonymous' for panel.
I've added the panel type, since IMHO, it could be confusing to have two classes of child windows (with and without parent).
So (if I've understood you correctly) this is not really a problem.
The bottom line is...
Don't attempt to use child windows in a different way that is documented.
That will led you to problems.
In general, using any thing in an non-documented way is not recommended and usually a source of problems.
I'll enforce error checking to avoid it anyway.
ie: In the same way that panel windows must not be activated it should be not released, since that should be done automatically via its parent.
Re: With a little help from the forum...
Posted: Mon Apr 12, 2010 5:47 pm
by sudip
Hello Roberto,
I am facing a different type of problem. I found buttons having icons "MINIGUI_...", are not showing the icons. In the given sample please check Add, Modify and Delete buttons. But, these are working properly with 3.0.27.
Code: Select all
#include <hmg.ch>
Function Main
DEFINE WINDOW main ;
AT 0,0 ;
WIDTH 635 ;
HEIGHT 460 ;
TITLE 'Item Group Setup' ;
main
DEFINE TOOLBAR ToolBar_1 BUTTONSIZE 50,30 FLAT RIGHTTEXT BORDER
BUTTON btnFirst ;
CAPTION '&Top' ;
picture "HP_TOP" ;
autosize
BUTTON btnPrev ;
CAPTION '&Prev' ;
PICTURE "HP_BACK" ;
autosize
BUTTON btnNext ;
CAPTION '&Next' ;
PICTURE "HP_NEXT" ;
autosize
BUTTON btnLast ;
CAPTION '&Last' ;
PICTURE "HP_END" ;
autosize
BUTTON btnAdd ;
CAPTION '&Add' ;
PICTURE "MINIGUI_EDIT_NEW" ;
autosize
BUTTON btnModify ;
CAPTION '&Modify' ;
PICTURE "MINIGUI_EDIT_EDIT" ;
autosize
BUTTON btnDelete ;
CAPTION '&Delete' ;
PICTURE "MINIGUI_EDIT_DELETE" ;
autosize
END TOOLBAR
end window
main.center
main.activate
return nil
With best regards.
Sudip
Re: With a little help from the forum...
Posted: Mon Apr 12, 2010 6:26 pm
by Roberto Lopez
sudip wrote:Hello Roberto,
I am facing a different type of problem. I found buttons having icons "MINIGUI_...", are not showing the icons. In the given sample please check Add, Modify and Delete buttons. But, these are working properly with 3.0.27.
<...>
I've changed all 'MINIGUI' names with 'HMG' from .0.29 release.
I've not documented that change, since these resources are attempted for internal use only.
So, please, rename the references in your sources, according the new names.
You can find it at \hmg\resources\hmg.rc.
Re: With a little help from the forum...
Posted: Mon Apr 12, 2010 6:45 pm
by esgici
Roberto Lopez wrote:
... this is not really a problem.
OK, thanks for clarification.
Best regards
--
Esgici
Re: With a little help from the forum...
Posted: Mon Apr 12, 2010 7:24 pm
by Roberto Lopez
esgici wrote:Roberto Lopez wrote:
... this is not really a problem.
OK, thanks for clarification.
Best regards
--
Esgici
I've already added code to prevent that a parent be implicit or explicit defined for a non-panel window, avoiding problems and confusion.
I've prevented explicit activation and release already.
This modifications will be available from 030 release.
Re: With a little help from the forum...
Posted: Mon Apr 12, 2010 7:30 pm
by esgici
Thanks a lot Roberto
Best regards
--
Esgici