On Monday 18 January 2010 1:22:51 am Jacek Kałucki wrote: > Użytkownik Adrian Klaver napisał: > >>> I don't believe that there is any way to type "null". Instead, I would > >>> bind a keystroke (say, Control-0) to a method that sets the control's > >>> Value to None. > >> > >> I have another suggestion Ed. > >> You may add to dTextBoxMixin, attribute AllowNullDates > >> and instead raising ValueError exception, allow null dates. > > > > It does allow Null dates, you just can't enter them by hand. > > For empty string date, convertStringValueToDataType() method return Null > value, > but in such situation ValueError exception is raised. > My proposal changes this behaviour so it would be possible. > For e.g., instead code: > if retVal is None: > there should be: > if retVal is None and not self.AllowNullDates:
Now you are asking for something different. Empty string is not Null. In any case it is covered. To follow you need to look at: def _getValue(self) I have tried it here and can set the Value to either a string or Null. The only issue is if I try to save it back to Postgres then the db will not accept an empty string as a date value. -- Adrian Klaver [email protected] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
