Bug #11934 2007-09-06 09:05
rj-away
wxSmith ArtProvider clients missing suffix and header
In the code generated for accessing ArtProvider resources (e.g. images for toolbar buttons), the client string is not correctly formed. According to what I've seen, client strings are meant to end in _C. This throws assertions at runtime with the debug libraries.
A simple way to do this would be to use one of the two macros defined in "wx/artprov.h" to do this mapping (probably the latter?)
#define wxART_MAKE_CLIENT_ID_FROM_STR(id) (id + _T("_C"))
#define wxART_MAKE_CLIENT_ID(id) _T(#id) _T("_C")
and so the wxSmith plugin generates code like
wxART_MAKE_CLIENT_ID(wxART_TOOLBAR)
rather than
_T("wxART_TOOLBAR_C")
This method (using the wxART_xxxx macros) is already used for the art id parameters.
Additionally, the "wx/artprov.h" header is not included when wxArtProvider images are used.
This behaviour was observed with the 5 Sep 2007 nightly snapshot, svn rev4425.
- Category
- Plugin::wxSmith
- Group
- Status
- Closed
- Close date
- 2007-11-12 22:08
- Assigned to
- byo
History
Are these useful areas?
For the code generation stuff:
src\plugins\contrib\wxSmith\wxwidgets\properties\wxsbitmapiconproperty.cpp, around lines 78-85
Header stuff (does it matter if this is included in unnecessary cases?):
src\plugins\contrib\wxSmith\wxwidgets\defitems\wxstoolbar.cpp around line 178
It was meant to be:
rather than
_T("wxART_TOOLBAR")
in the original submission.
The problem *is* the lack of _C in the output string.
Patch #2166 was made to address these problems.
This bug has been already fixed in HEAD.
Thank you.