Author Topic: bug in wxSmith? re: Checkable menu item not checkable  (Read 3228 times)

Offline pdsonic

  • Multiple posting newcomer
  • *
  • Posts: 17
bug in wxSmith? re: Checkable menu item not checkable
« on: July 21, 2008, 01:52:42 am »
Hi,

I'm not sure if this is the right forum.

I'm using CB 5106 on WinXP SP2

On my main wxFrame I have a menu item that is checkable. In wxSmith I set the item as Check, but when I examine the object using the debugger the Menu item kind is wxITEM_NORMAL. And of course the check mark does not appear when I click on it.

However, if I set its kind MenuItem->SetKind( wxITEM_CHECK ), after it is constructed, it works.

Also, this is using the XRC file.

Thanks.

pdsonic

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: bug in wxSmith? re: Checkable menu item not checkable
« Reply #1 on: July 21, 2008, 11:08:31 pm »
Yup, this is a bug, thanks for reporting :)

BYO

Offline pdsonic

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: bug in wxSmith? re: Checkable menu item not checkable
« Reply #2 on: July 22, 2008, 06:25:37 am »
You're welcome.   :)

And I have another one...

For obtaining the MenuItem's address the auto-generated code is as follows:

   MenuItemAbout = (wxMenuItem*)FindWindow(XRCID("idMenuItemAbout"));

But this returns NULL. After looking on the forums (MenuItem's do not inherit from wxWindow), I found that the following works for me:

   MenuItemAbout = GetMenuBar()->FindItem(XRCID("idMenuItemAbout"));


This is a minor problem, as the workaround is quite easy.


pdsonic

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: bug in wxSmith? re: Checkable menu item not checkable
« Reply #3 on: July 22, 2008, 10:24:13 pm »
Thanks again :)

I'm just starting to fix it :) Should be ready today.

Regards
   BYO

EDIT: Fixed in rev. 5136
« Last Edit: July 22, 2008, 11:10:49 pm by byo »