[wxruby-users] problem with Menu.append_check_item()

Alex Fenton alex at pressure.to
Fri Jan 4 16:02:10 EST 2008


Robert Anderson wrote:
> Menu.append_check_item(), like Menu.append(), is supposed to return a 
> reference to the created menu item.  Here is a test code which seems 
> to show that this behavior works for append(), but fails for 
> append_check_item().  This is the output I get:
>
> % ruby test-menu.rb
> #<Wx::MenuItem:0xb74c036c>
> nil
>
> Am I missing something or is this a bug?  Both menu items are created 
> and work as expected.  I am running the 1.9.2 tarball.

Thank you for the report and the clear test-case. It's a bug; the wrong 
C++ method signature was in one of the header files from which the API 
is generated.

It's now fixed by SVN:1486 for the next release. If you need to work 
around n the interim, you should can use the long form of append_item 
and give Wx::ITEM_CHECK as the fourth parameter.

cheers
alex



More information about the wxruby-users mailing list