View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0014888 | MMW v4 | Framework: Scripts/Extensions | public | 2018-06-19 20:36 | 2018-08-27 14:23 |
Reporter | zvezdan | Assigned To | |||
Priority | none | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 4.1.22 | ||||
Summary | 0014888: AV error on (GroupBox|Panel).Common.DestroyControl | ||||
Description | Common.DestroyControl always causes AV error when it is applied to GroupBox or Panel controls. The test script use modal form, but the AV error happens with modeless forms when applying DestroyControl in OnClose event as well. | ||||
Steps To Reproduce | 1. install test script; 2. choose DestroyControl test in File menu; 3. click DestroyControl button; 4. click Close button -> AV error. Option Explicit Dim grpTest Dim chkTest Sub OnStartUp() Dim oMenuItem Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_File, 0, 0) oMenuItem.Caption = "DestroyControl test" oMenuItem.OnClickFunc = "Test" oMenuItem.UseScript = Script.ScriptPath End Sub Sub Test(oMenuItem) Dim oForm Dim btnClose Dim btnDo Set oForm = SDB.UI.NewForm oForm.Common.SetRect 100, 100, 350, 130 oForm.BorderStyle = 3 oForm.FormPosition = 4 oForm.Caption = oMenuItem.Caption Set grpTest = SDB.UI.NewGroupBox(oForm) ' Set grpTest = SDB.UI.NewPanel(oForm) grpTest.Common.SetRect 10, 10, 300, 40 ' Set chkTest = SDB.UI.NewCheckBox(grpTest) ' chkTest.Common.SetRect 10, 10, 300, 20 ' chkTest.Caption = "Chk test" Set btnDo = SDB.UI.NewButton(oForm) btnDo.Caption = SDB.Localize("&DestroyControl") btnDo.Common.SetRect 120, 60, 90, 25 Script.RegisterEvent btnDo, "OnClick", "btnDo_OnClick" Set btnClose = SDB.UI.NewButton(oForm) btnClose.Caption = SDB.Localize("&Close") btnClose.Common.SetRect 220, 60, 90, 25 btnClose.Cancel = True btnClose.ModalResult = 2 oForm.showModal End Sub Sub btnDo_OnClick() grpTest.Common.DestroyControl End Sub | ||||
Tags | No tags attached. | ||||
Fixed in build | 1876 | ||||