Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
Error filling ApplicationMenu: The tools collection has not been initialized.
posted

We're filling the application menu with items as defined in our database. This works fine for the rest of the Ribbon, but when doing it with the ApplicationMenu, we keep getting the "The tools collection has not been initialized." error.

This is our code:


                        /* Create Button Tool */
                        assign
                            oButtonTool = CreateButton(buffer bPrgTabGrpTool).

                        /* Apply instance properties like image */
                        ApplyInstanceProps(oButtonTool, buffer bPrgTabGrpTool).
                          
                        poRibbon:ToolbarsManager:Tools:Add(oButtonTool).
                        poRibbon:ApplicationMenu:ToolAreaLeft:Tools:AddTool(oButtonTool:Key).

If we replace the last two lines by the line below, we don't get the error anymore. But then we also don't see any images. The CreateButton method assigns the SharedPropsInternal:AppearancesSmall:Appearance:Image and SharedPropsInternal:AppearancesLarge:Appearance:Image properties, which is working fine for the rest of the Ribbon.

poRibbon:ApplicationMenu:ToolAreaLeft:Tools:Add(oButtonTool).

We're programming in OpenEdge 11.1, which is using NetAdvantage for .NET v2011 Vol2.

Parents Reply Children
No Data