From: Oberholtzer,Stephen <ste...@fr...> - 2004-02-10 14:36:40
|
> > * It is not well documented how to create a new color by name. >=20 > Wrong. > The docs clearly list 3 constructors: > wxColour() > Default constructor. >=20 > wxColour(const unsigned char red, const unsigned char=20 > green, const unsigned char blue) > Constructs a colour from red, green and blue values. >=20 > wxColour(const wxString& colourNname) > Constructs a colour object using a colour name listed=20 > in wxTheColourDatabase. > wxColour(const wxColour& colour) > Copy constructor. >=20 > E:\>perl -MWx -le"die Wx::Colour->new('pink')" > Wx::Colour=3DSCALAR(0x1abf1f4) > E:\> OK, now I see that (I missed it before, which is why I also missed the wxColourDatabase :/) > constants are NOT strings. > In perl, Constants are functions. >=20 > E:\>perl -MWx=3DwxRED -e"die wxRED()" > Wx::Colour=3DSCALAR(0x219dde8) Since C++ doesn't always map to Perl very well, I had grepped my Wx = directory for 'Colour', but didn't see anything relating to Wx::Colour, which left me = even more confused. And since my grep didn't return something I recognized, I = started guessing. Thanks for pointing me in the right direction :) Now, any info about the crashes? -- Stevie-O Real programmers use COPY CON PROGRAM.EXE This E-Mail is intended only for the use of the individual or entity to = which it is addressed, and may contain information that is privileged, = confidential and exempt from disclosure under applicable law. If you = have received this communication in error, please do not distribute it = and notify us immediately by telephone: 610-902-9000 and delete the = original message. |