|
|
 | | From: | Jean-Pierre Martel | | Subject: | Menu + subform => dBASE has encountered... | | Date: | Sun, 26 Dec 2004 23:49:45 -0500 |
|
|
 | During the closing of a form, one gets a "dBASE has encountered..." message when a menu is used with subform(s), as in the code below.
However, if we take out the subform, no problem. If we take out the menu, no problem.
To be both menu- and subform-compatible, the menu object has to be released explicitly in the canClose() event handler.
Jean-Pierre Martel, editor The dBASE Developers Bulletin Blue Star dBASE Plus Core Concepts Graduate
** END HEADER -- do not remove this line // // Generated on 2003-04-25 // parameter bModal local f f = new EncounteredForm() if (bModal) f.mdi = false // ensure not MDI f.readModal() else f.open() endif
class EncounteredForm of FORM with (this) Open = class::FORM_OPEN canClose = class::FORM_CANCLOSE metric = 6 // Pixels height = 200 left = 110 top = 0 MDI = false width = 475 clientEdge = true text = " Main Form" autoCenter = true endwith
Function Form_Open Form.TestMenu1 = new TestMENU(form, "root") Form.SubForm1 = new subForm(Form,' Sub-Form No. 1') Form.SubForm1.metric = 6 Form.SubForm1.width = 200 SUPER::OPEN() Form.SubForm1.open() Form.SubForm1.setFocus() return
Function Form_canClose * release object Form.TestMenu1 return(true)
endclass
class TestMENU(formObj, name) of MENUBAR(formObj, name) this.MENU1 = new MENU(this) with (this.MENU1) text = "&File" endwith
this.MENU1.MENU2 = new MENU(this.MENU1) with (this.MENU1.MENU2) text = "&Whatever..." endwith endclass
|
|
 | | From: | Marty Kay | | Subject: | Re: Menu + subform => dBASE has encountered... | | Date: | Tue, 18 Jan 2005 11:51:10 -0500 |
|
|
 | Jean-Pierre,
I have reproduced the GPF and I've entered QAID: 5156 for this.
Thanks,
- Marty Kay (dBI) -
"Jean-Pierre Martel" wrote in message news:MPG.1c395e79615c9698989685@news.dbase.com... > > During the closing of a form, one gets a "dBASE has encountered..." > message when a menu is used with subform(s), as in the code below. > > However, if we take out the subform, no problem. If we take out the menu, > no problem. > > To be both menu- and subform-compatible, the menu object has to be > released explicitly in the canClose() event handler. > > Jean-Pierre Martel, editor > The dBASE Developers Bulletin > Blue Star dBASE Plus Core Concepts Graduate > > ** END HEADER -- do not remove this line > // > // Generated on 2003-04-25 > // > parameter bModal > local f > f = new EncounteredForm() > if (bModal) > f.mdi = false // ensure not MDI > f.readModal() > else > f.open() > endif > > class EncounteredForm of FORM > with (this) > Open = class::FORM_OPEN > canClose = class::FORM_CANCLOSE > metric = 6 // Pixels > height = 200 > left = 110 > top = 0 > MDI = false > width = 475 > clientEdge = true > text = " Main Form" > autoCenter = true > endwith > > Function Form_Open > Form.TestMenu1 = new TestMENU(form, "root") > Form.SubForm1 = new subForm(Form,' Sub-Form No. 1') > Form.SubForm1.metric = 6 > Form.SubForm1.width = 200 > SUPER::OPEN() > Form.SubForm1.open() > Form.SubForm1.setFocus() > return > > Function Form_canClose > * release object Form.TestMenu1 > return(true) > > endclass > > class TestMENU(formObj, name) of MENUBAR(formObj, name) > this.MENU1 = new MENU(this) > with (this.MENU1) > text = "&File" > endwith > > this.MENU1.MENU2 = new MENU(this.MENU1) > with (this.MENU1.MENU2) > text = "&Whatever..." > endwith > endclass
|
|
 | | From: | Jean-Pierre Martel | | Subject: | Re: Menu + subform => dBASE has encountered... | | Date: | Tue, 18 Jan 2005 12:41:03 -0500 |
|
|
 | In article , mkay@dbase.com says... > > I have reproduced the GPF and I've entered QAID: 5156 for this.
Thanks.
Jean-Pierre Martel, editor The dBASE Developers Bulletin Blue Star dBASE Plus Core Concepts Graduate
|
|
|