[Seaside] WADateSelector - invalid date handling
C. David Shaffer
cdshaffer at acm.org
Tue Feb 22 20:30:05 CET 2005
Dmitry Dorofeev wrote:
[snip]
>
> But when I select 31 feb, i see message
> You chose 1915-03-03.
> For 30 feb i got
> You chose 1915-03-02.
Hmm, with Seaside 2.5b7 and Squeak 3.7full image I get 3/3/2005 which
definitely isn't the correct behavior either altough it makes a little
more sense than what you're seeing. What version of Squeak are you
running? My tutorial was written under 3.6...obviously something has
changed with date handling so that invalid dates are no longer an error
in the Date class. Frustrating. I can offer a patch to preserve the
behavior of isValid. I could also patch the WADateSelector>>date method
to validate the date. This would preserve the existing behavior in
WADateSelector. Avi, any thoughts on this? "don't care" counts, I
guess :-) Hell, I've just attached the patch, reasonbly close to
preserving the previous behavior of #date and #isValid.
David
--
C. David Shaffer
http://www.cs.westminster.edu/~shaffer
http://www.shaffer-consulting.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WADateSelector-patch.1.cs
Type: text/x-csharp
Size: 642 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20050222/b53c063c/WADateSelector-patch.1.bin
More information about the Seaside
mailing list