button.gadget not updating

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

button.gadget not updating

Post by chris »

Since the recent button.gadget update (53.17) my button imagery is failing to refresh.
Basically I'm doing a RefreshSetGadgetAttrs to push a new bitmap.image to the button, however the image does not update.
The tag is being accepted, as if I click on the button I can see the new image, however it is no longer updating without me manually forcing it through the GUI.
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland
Contact:

Re: button.gadget not updating

Post by salass00 »

As usual a small test program would be helpful. Also what was the last version of button.gadget that was working?
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: button.gadget not updating

Post by chris »

salass00 wrote:As usual a small test program would be helpful.
Attached.

It's a hacked old image button example - I've changed the ghost so it should toggle the unselected top gadget between the selected/unselected image.
Also what was the last version of button.gadget that was working?
No idea. It's whatever the previous public version was - Rollback won't tell me the version.
Attachments
imagebuttons.lha
(20.86 KiB) Downloaded 307 times
User avatar
LyleHaze
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 525
Joined: Sat Jun 18, 2011 5:06 pm
Location: North Florida, near the Big Bend

Re: button.gadget not updating

Post by LyleHaze »

I can confirm that button.gadget 53,15 is working correctly.

With the code given:

On initial opening, the top button graphics show "Selected" when pressed, "unseleted" when not pressed.
Click once on the ghost(bottom button) to add a big red 'X', top button graphics still work as expected.
Click again on the ghost, Red 'X' is removed, top button appears "stuck" in the selected state, because the program has assigned the "selected" image to both states of the top button.

So the initial opening is the only time the top button graphics can toggle while the bottom button is unselected.

As mentioned before, this is working correctly under button.gadget 53.15, though the actual behavior is a bit odd, it accurately follows the code logic.
I'll also add that the toggle state of the lower button is not actually linked to the gadget state, but a separate on-off toggle that could get out of sync with the actual button state.
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 534
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland
Contact:

Re: button.gadget not updating

Post by salass00 »

chris wrote: It's a hacked old image button example - I've changed the ghost so it should toggle the unselected top gadget between the selected/unselected image.
The GA_Image refresh issue should be fixed in version 53.18 which I've just uploaded for betatesting.
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: button.gadget not updating

Post by chris »

salass00 wrote:The GA_Image refresh issue should be fixed in version 53.18 which I've just uploaded for betatesting.
Wonderful, thanks.
Post Reply