Author Topic: wxSmith - wxToolBar message Identifiers  (Read 3040 times)

Offline PaulS

  • Multiple posting newcomer
  • *
  • Posts: 25
wxSmith - wxToolBar message Identifiers
« on: March 16, 2008, 08:25:32 pm »
I have some code with a menu with checked items and a toolbar with toolbaritems for the same checked items.  Following the wxWidgets sample samples/richtext.cpp I tried to set the Identifiers to the same value but wxSmith refuses (probably to prevent inadvertent duplicates). If I edit the code to make them the same all works well.  Could wxSmith just warn me of duplicates rather than outright forbidding them?

I am no expert in this area, I am just copying the one example I found.  Perhaps there is a better way to sync the ToolBar and Menu?

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith - wxToolBar message Identifiers
« Reply #1 on: March 16, 2008, 09:43:39 pm »
This could be a problem - wxSmith and wxWidgets require uniqueness of ids in some cases - especially when dealing with XRC files.

Regards
   BYO

Offline PaulS

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: wxSmith - wxToolBar message Identifiers
« Reply #2 on: March 16, 2008, 10:07:18 pm »
OK, its easy enough to generate the toolbar manually.  Basically I just copied your code and placed it outside the generated section :D.  I don't use xrc files at this time so I'll face that issue later if I need to.