Hello wxruby users, Kevin, thank you for the answer about the status bar flicker. I think this is a question for wxWindows mailing lists. It''s great that 0.2 version will be released soon! It is impossible to create submenues in 0.1. Could you add the ruby function append_submenu(id, item, submenu, helpString) to the Wx::Menu class in 0.2, which calls the wxWindows function void wxMenu::Append( int id, const wxString& item, wxMenu *subMenu, const wxString& helpString = "" ), please? Also, function append_item() doesn''t work: menu = Menu.new submenu = Menu.new submenu.append(2, "item of submenu") item_with_submenu = MenuItem.new(menu, 2, ''&Submenu'', '''', ITEM_NORMAL, submenu) menu.append_item( item_with_submenu ) I get error: in `append_item'': wrong argument type nil (expected Data) (TypeError) Could you check it, please? -- Best regards, Pavel mailto:papushev@inp.nsk.su
Pavel A. Papushev wrote:> It''s great that 0.2 version will be released soon! It is impossible > to create submenues in 0.1. Could you add the ruby function > append_submenu(id, item, submenu, helpString) to the Wx::Menu class in 0.2, > which calls the wxWindows functionI can add this after the 0.2 release. I don''t want to add new code right now. It would be great if you could add this to the rubyforge wxruby "feature request" tracker, as a missing api method.> Also, function append_item() doesn''t work: > > menu = Menu.new > submenu = Menu.new > submenu.append(2, "item of submenu") > item_with_submenu = MenuItem.new(menu, 2, ''&Submenu'', '''', ITEM_NORMAL, submenu) > menu.append_item( item_with_submenu ) > > I get error: in `append_item'': wrong argument type nil (expected Data) (TypeError) > Could you check it, please?Thank you for reporting this! append_item was completely broken. For some reason, I had commented out an important line. It works now, and I was able to create a submenu using this approach. I have checked in this code, and it will be included in 0.2. Kevin