From: epang@fraser.sfu.ca (Eugene Pang)
Subject: More GadToolsBox bugs
Organization: Simon Fraser University, Burnaby, B.C., Canada
Date: Tue, 8 Sep 1992 00:07:09 GMT

Seeing as how there's some renewed interest in GTB, I thought I'd share my
bug list with you all.  And if Steen Raboel (who's email address I've lost)
is reading this, perhaps you could forward this bug report to GTB's author
on FIDOnet.

Feel free to add to the list.  Note these bugs are in GadToolsBox v1.3
37.111 (18.4.92) [available on FF659]...and not in gadtools.library. 
These bugs are in addition to those mentioned in Jan's TODO list.


BUGS (some which are more or less the same)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Button.c:
    *   Can't turn off Disabled or Toggle options for button gadget
        if gadget has a user defined label

Checkbox.c:
    *   Can't turn off Disabled or Checked options for checkbox gadget
        if gadget has a user defined label

    *   Can't turn off highlit gadget text

Cycle.c:
    *   Ignores Disabled option for cycle gadget (new for V37)

    *   Can't turn off highlight gadget text

ListView.c:
    *   Can't turn off Read Only or Show Selected options for ListView
        gadget

    *   Can't turn off highlit gadget text

Mx.c:
    *   If you delete all the labels previously entered, you're
        prevented from adding new ones; you get the error message
        "You already have the maximum number of labels entered !"

Palette.c:
    *   Can't turn off Disabled option for palette gadget
    
    *   Can't turn off highlit gadget text

Scroller.c & Slider.c:
    *   Can't turn off Disabled option for scroller/slider gadgets

    *   Can't turn on RelVerify option for scroller/slider gadget

    *   Can't turn off highlit gadget text

StrInt.c.c:
    *   Can't turn off Disabled option for string or integer gadgets

    *   Can't turn off highlit gadget text

WindowSpecial.c:
    *   Can't turn off ZOOM option in Edit Tags window; workaround
        is to turn off sizing gadget first (press F10)
        [reported by: d9mats@dtek.chalmers.se]

Gen.c:
    *   Fails to write WA_IDCMP flags for gadgets; last two args
        to setmem() transposed on line 211.  See WriteGadToolsBoxIDCMP().

       
FIXES
~~~~~
The highlighting bug can be fixed in the Edit[GadgetType]() functions,
by resetting the variable 'flag' to 0 before the IDCMP loop.

The other "can't turn off/on" bugs can probably be fixed in the
Change[GadgetType]() functions by removing the OR symbol in the code
that reads:

<    if ( strncmp( slab, "Gadget", 6 ) && strlen( slab )) {
<        strcpy( &eng->en_SourceLabel[0], slab );
!        eng->en_SpecialFlags |= EGF_USERLABEL;
<    } else
<        eng->en_SpecialFlags = 0l;

to:

>    if ( strncmp( slab, "Gadget", 6 ) && strlen( slab )) {
>        strcpy( &eng->en_SourceLabel[0], slab );
!        eng->en_SpecialFlags = EGF_USERLABEL;
>    } else
>        eng->en_SpecialFlags = 0l;

In cases like StrInt.c, this is complicated by the unknown need by
the author to preserve the special flags via a variable called 'spec'.
Caution recommended when fixing these functions.

The bug in Mx.c sounds similar to the one already fixed in Cycle.c.

To fix the disabled ZOOM checkbox bug in WindowSpecial.c, the code
should disable the checkbox when there is no sizing gadget, not when
there is one.

The bug in genc.c can be fixed by patching the executable (if you don't
want to recompile the source).  At about 73382 bytes offset from the
beginning of the GadToolsBox [executable] file, change the hex bytes
<< 72 0E 70 00 >> to << 72 00 70 0E >>.
Newsgroups: comp.sys.amiga.programmer