I'm going to give you the benefit of the doubt on the explanation of why dPref needs to have the __nonzero__ method always return False. I like the way dPref behaves, and I like your well-written explanation. I still smell something fishy, but I'll leave it alone.
However, on the second issue: Ed Leafe wrote: >> if self.DataSource is not None >> >> should be sufficient, and would keep similar problems from happening >> with other non-dPref objects. > > No, because it could also be an empty string. I know that historically DataSource gets the empty string as a default value, but is there any underlying reasoning for this? IOW, why can't DataSource default to None, and if set to e.g. an empty string, get converted to None instead? > And there really aren't > any other objects that behave like dPref does. None that you know about at this time. > You need to really work > with them to understand how they are supposed to behave. This is one > of those cases where the "magic" is entirely worth it, as it makes > preference handling extremely simple to the developer. Agreed about the workings of dPref, other than that the __nonzero__ thing doesn't seem necessary to me. > This issue was > one of the edge cases that I missed because I always had Web Update > off on my machine, due to working with a source control-managed copy > of Dabo. I'm just wondering if this edge case may point out some flaws in our design of dDataControlMixin WRT DataSource and possibly DataField. But I'm not asserting any opinion. Paul _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/[email protected]
