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.
button.gadget not updating
- salass00
- AmigaOS Core Developer
- Posts: 534
- Joined: Sat Jun 18, 2011 4:12 pm
- Location: Finland
- Contact:
Re: button.gadget not updating
As usual a small test program would be helpful. Also what was the last version of button.gadget that was working?
Re: button.gadget not updating
Attached.salass00 wrote:As usual a small test program would be helpful.
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.
No idea. It's whatever the previous public version was - Rollback won't tell me the version.Also what was the last version of button.gadget that was working?
- Attachments
-
- imagebuttons.lha
- (20.86 KiB) Downloaded 307 times
- LyleHaze
- 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
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.
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.
- salass00
- AmigaOS Core Developer
- Posts: 534
- Joined: Sat Jun 18, 2011 4:12 pm
- Location: Finland
- Contact:
Re: button.gadget not updating
The GA_Image refresh issue should be fixed in version 53.18 which I've just uploaded for betatesting.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.
Re: button.gadget not updating
Wonderful, thanks.salass00 wrote:The GA_Image refresh issue should be fixed in version 53.18 which I've just uploaded for betatesting.