[interfacekit] Re: programming problems

On 2004-02-01 at 23:06:23 [+0100], Andrew Bachmann wrote:
> 
> Assuming that the constants are multi-bit, I think the most reliable way to 
> test would be to use a
> construct like this:
> 
> if (ResizingMode() & B_FOLLOW_LEFT_RIGHT == B_FOLLOW_LEFT_RIGHT)
> ....
> if (ResizingMode() & B_FOLLOW_LEFT == B_FOLLOW_LEFT)
> ....
> if (ResizingMode() & B_FOLLOW_RIGHT == B_FOLLOW_RIGHT)
> ....

This won't work in general, since it holds for instance:
        B_FOLLOW_BOTTOM & B_FOLLOW_TOP == B_FOLLOW_TOP

As I wrote earlier, the resizing modes values consist of four components, 
each of which not being a bit disjunction but a simple value (_VIEW_*_).

CU, Ingo

Other related posts: