Page 1 of 1

Set unchecked DateGadget value to -1, please.

Posted: Sun Dec 14, 2014 5:36 pm
by es_91
The Doc says:
PB Documentation wrote:If you specify #PB_Date_Checkbox in the Flags parameter, the Gadget will have a checkbox with which the user can set the Gadget to 'no date' [...]. While the checkbox is unchecked, GetGadgetState() will return 0. To change the state of the checkbox, use SetGadgetState() with either 0 (=checkbox unchecked) or any valid date.
Since '0' is a valid date, and the usual date error code is '-1', why not use '-1' for an unchecked DateGadget?

Re: Set unchecked DateGadget value to -1, please.

Posted: Sat Dec 20, 2014 9:46 am
by chris319
This is a good idea.