OSLib / wimp.h / wimp_ERROR_BOX_CATEGORY

Tony van der Hoff OSLib at mk-net.demon.co.uk
Wed May 31 13:08:32 BST 2000


On Wed, 31 May 2000, at 10:34:35, Dave Appleby
<DaveAppleby at btinternet.com> wrote on the subject "OSLib / wimp.h /
wimp_ERROR_BOX_CATEGORY":

>OSLib 6.01 / wimp.h / wimp_ERROR_BOX_CATEGORY
>
>I think that using the shift value for the new categories
>makes things unnescessarily complex. Surely the programmer
>doesn't need to know how the flags are arrived at...
> 
>So, can I suggest removing wimp_ERROR_BOX_CATEGORY_SHIFT, 
>and defining absolute values for the category flag bits instead?
>
>eg
>#define wimp_ERROR_BOX_GIVEN_CATEGORY           ((wimp_error_box_flags)
>0x100u)
>#define wimp_ERROR_BOX_CATEGORY                 ((wimp_error_box_flags)
>0xE00u)
>#define wimp_ERROR_BOX_CATEGORY_INFO            ((wimp_error_box_flags)
>0x300u)
>#define wimp_ERROR_BOX_CATEGORY_ERROR           ((wimp_error_box_flags)
>0x500u)
>#define wimp_ERROR_BOX_CATEGORY_PROGRAM         ((wimp_error_box_flags)
>0x700u)
>#define wimp_ERROR_BOX_CATEGORY_QUESTION        ((wimp_error_box_flags)
>0x900u)
>

The basic idea doesn't seem unreasonable to me. However, this is Tom's
work, and I'm unsure of the original logic behind doing it this way,
he'll probably have his own comments.

However, getting rid of/changing values is not on; there may have been
people who have used the present values, and we can't break their
programs. So, we'd have to invent some new names; how about:
#define wimp_ERROR_BOX_CATEGORY_INFO_WORD ((wimp_error_box_flags)0x300u)
etc., or something like that?

-- 
Tony van der Hoff         |  Mailto:tony at mk-net.demon.co.uk
                          |  Mailto:avanderhoff at iee.org
Buckinghamshire, England  |  http:www.mk-net.demon.co.uk



More information about the oslib-user mailing list