[wx-dev] wxColour strings

Vadim Zeitlin vadim at wxwindows.org
Fri Jun 1 06:27:27 PDT 2007


On Fri, 01 Jun 2007 14:47:33 +0200 Robert Roebling wrote:

RR> I understood that, but maybe we should add a new constuctor
RR> to wxPen, if only to avoid having "char *" and "wchar_t *"
RR> in the constructor of wxColour.

 It's true that having wxPen(const wxString&) ctor would also solve this
particular problem but if we didn't have wxColour(const char *) ctor then
code like

	void MyFunction(const wxColour& col);

	...

	MyFunction("black");

would break and I think such code occurs often enough to warrant having the
extra wxColour ctor to fix it.

 Regards,
VZ





More information about the wx-dev mailing list