Minor GadTools Bug

NathanH · 502

NathanH

  • Newbie
  • *
    • Posts: 17
    • Karma: +1/-0
on: December 17, 2022, 04:28:36 PM
Hi,

I've been working with all of the GadTools gadgets and appear to have found a minor bug.  My function which calls GT_GetGadgetAttrsA gets one attribute at a time.  I had been using a return value of zero to indicate an error which misled me into thinking the problem was worse than it was.

When I get GTCY_Active for a Cycle gadget or GTPA_Color for a Palette gadget the return value from GT_GetGadgetAttrsA is zero even though one tag was successfully processed so should be returning one.  I now ignore the return value (numProcessed) so have no way to know whether the call was successful or not.  Otherwise everything seems to be excellent!  Thanks for your great work!

NathanH



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #1 on: December 18, 2022, 11:59:55 AM
Hi,

I opened a bug report here: https://github.com/deadw00d/AROS/issues/77

If you are interested, you can take a stab at checking what it is not working as expected, source code is available here:

https://github.com/deadw00d/AROS/tree/alt-abiv0/workbench/libs/gadtools



NathanH

  • Newbie
  • *
    • Posts: 17
    • Karma: +1/-0
Reply #2 on: December 18, 2022, 01:11:04 PM
Thanks very much!  I'll take a look at it but I'm not a C programmer so will likely be unsuccessful.  I'm using parForth for my work with GadTools.  It is pForth but compiled to be able to call AROS functions.  I'll be uploading it to AROS-Archives and Aminet sometime this week.  I'm currently writing documentation.  Thanks.

NathanH