[Gambas-user] SpinBox running wild
T Lee Davidson
t.lee.davidson at gmail.com
Sun Aug 2 20:12:06 CEST 2020
On 8/2/20 2:02 PM, T Lee Davidson wrote:
> It appears that the use of the Message box (and even a custom modal form, for that matter) interferes with proper event
> handling. SpinBox1_Change gets re-triggered even without a user-generated SpinBox change. If the If/Endif Message box block is
> commented out, the event is handled without issue.
>
> Using Wait after the If/Endif Message box block does not help. Using Stop Event in SpinBox1_Change does not help.
>
I almost forgot to mention that I found a bug in your code.
If you click the "start" button on the main form, then "Cancel" on the FPrePrint form, then "start" again, a Type Mismatch
exception occurs at line 85 of FPrePrint.class: dDate = Date(CInt(SpinBox1.Text), CInt(ComboBox2.Text), 1)
This can be fixed by removing the Static keyword from line 6: Static Private bLoading As Boolean = True
--
Lee
More information about the User
mailing list