View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0011496 | MMW v4 | Framework: Scripts/Extensions | public | 2013-11-20 19:13 | 2014-06-06 02:01 |
Reporter | zvezdan | Assigned To | |||
Priority | urgent | Severity | minor | Reproducibility | always |
Status | assigned | Resolution | open | ||
Product Version | 4.1.2 | ||||
Target Version | 4.1.2 | ||||
Summary | 0011496: Error -2147418113 - Abstract Error - when adding button to custom toolbar | ||||
Description | If custom toolbar is created during start-up, but none button is immediately added to it, when I try to add some button later I get the mentioned error dialog box. Here is the test script: Option Explicit Sub OnStartUp() Dim oMenuItem Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0) oMenuItem.Caption = "Add toolbar button" oMenuItem.OnClickFunc = "Test" oMenuItem.UseScript = Script.ScriptPath Set SDB.Objects("MyToolbar") = SDB.UI.AddToolbar("Test Toolbar") End Sub Sub Test(oMenuItem) Set SDB.Objects("tbrTest2") = SDB.UI.AddMenuItem(SDB.Objects("MyToolbar"), 0, 0) SDB.Objects("tbrTest2").Caption = "Test2" End Sub However, if some button is added to the toolbar during start-up, then I could add new button to it later without any problem: Option Explicit Sub OnStartUp() Dim oMenuItem Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0) oMenuItem.Caption = "Add toolbar button" oMenuItem.OnClickFunc = "Test" oMenuItem.UseScript = Script.ScriptPath Set SDB.Objects("MyToolbar") = SDB.UI.AddToolbar("Test Toolbar") Set SDB.Objects("tbrTest1") = SDB.UI.AddMenuItem(SDB.Objects("MyToolbar"), 0, 0) SDB.Objects("tbrTest1").Caption = "Test1" End Sub Sub Test(oMenuItem) Set SDB.Objects("tbrTest2") = SDB.UI.AddMenuItem(SDB.Objects("MyToolbar"), 0, 0) SDB.Objects("tbrTest2").Caption = "Test2" End Sub | ||||
Tags | No tags attached. | ||||
Fixed in build | |||||