[Gambas-user] Check Boxes (a bug?)
Benoît Minisini
g4mba5 at gmail.com
Fri Jun 11 02:17:20 CEST 2021
Le 11/06/2021 à 02:08, T Lee Davidson a écrit :
> On 6/10/21 5:09 PM, John Dovey wrote:
>> I have an odd change of value which I can't track down.
>> I load some values of true and false from an ini file into variables
>> declared as boolean, then set the checkbox.value = variable
>>
>> On the .click event of the checkbox, I make some changes but when it
>> emerges from that, the values are back to defaults. You can see in the
>> load event of the form I have some debug statements to show the change.
>>
>> You can see the check boxes on the third tab
>>
>> JD
>
> Bruce Steers is right about hSettings needing to be global. I made
> changes to effect that including not re-creating it multiple times. And,
> it still does not work as it should. The settings do get saved
> correctly, but upon a relaunch, they are reverted.
>
> Stepping through the program, I see that at line 126 ("ChkAflag_CM.Value
> = myAflag_CM"),
> *setting the value of the CheckBox is treated as a click* and the
> ChkAflag_CM_Click event handler is triggered.
>
> ** Benoît, is this expected behavior, or a bug? **
>
The Click event is raised when the value of the control changes,
whatever the reason. It's the expected behaviour.
Regards,
--
Benoît Minisini
More information about the User
mailing list