Good point.  It may, however, make the constants a bit confusing since some of 
them would have to be declared as negatives.  For instance, in that world, 
wxTAB_TRAVERSAL would have to be renamed wxNO_TAB_TRAVERSAL.  If you had an 
object with TAB_TRAVERSAL turned off and wanted to turn it back on, you would 
have to clear wxNO_TAB_TRAVERSAL, which is suspiciously like a double-negative. 
 At the end of the day, this is one reason I think bitmasks aren't a 
particularly good interface.  They're efficient, but they aren't actually very 
programmer friendly.  Which is something else to remember when writing your own 
code!  Avoid bitmasks as the interface for groups of binary settings!  At one 
point I wrote Data::BitMask because I wanted a friendlier interface to 
bitmasks, but even it is really just a kludge over the underlying issue.  I 
won't claim to know what the preferred interface is (a hash or dictionary?), 
and it may vary from situation to situation.

Toby Ovod-Everett
AT&T Alaska Information Services
907.264.7620
This e-mail and any files transmitted with it are AT&T property, are 
confidential, and are intended solely for the use of the individual or entity 
to whom this email is addressed. If you are not one of the named recipient(s) 
or otherwise have reason to believe that you have received this message in 
error, please notify the sender and delete this message immediately from your 
computer. Any other use, retention, dissemination, forwarding, printing, or 
copying of this e-mail is strictly prohibited.

-----Original Message-----
From: Shawn H Corey [mailto:shawnhco...@gmail.com] 
Sent: Wednesday, June 08, 2011 3:23 AM
To: wxperl-users@perl.org
Subject: Re: What good is a Wx::Panel?

On 11-06-07 07:29 PM, Ovod-Everett, Toby wrote:
> since the alternative would prevent overriding a default-true bit with a 
> false value.

The alternative is to have the default as all bits being zero.  That 
way, they can be turned off by setting the appropriate bit to one.  It's 
too late to change wxWidgets but this is something to remember when 
writing your own code.


-- 
Just my 0.00000002 million dollars worth,
   Shawn

Confusion is the first step of understanding.

Programming is as much about organization and communication
as it is about coding.

The secret to great software:  Fail early & often.

Eliminate software piracy:  use only FLOSS.

Reply via email to