On 5/3/10 12:22 PM, Ed Leafe wrote: > On May 3, 2010, at 3:05 PM, Paul McNett ☆ wrote: > >>> It should probably be a try/except anyway. It's unpythonic to test for >>> common conditions; it's better to catch the exception. >> >> I think checking for Modal first makes sense in this context since dDialog >> allows >> Modal or nonModal use, but we call EndModal() regardless (from runCancel et. >> al). So >> the check is correct (because it isn't checking for an exceptional case). > > Really? What percentage of dialogs will not be modal?
Dunno, but we provide the Modal property, so we should check for modality before calling upchain to EndModal(). Actually, I should have made the check in the four methods that call EndModal(), not from within EndModal() itself, but that's minor. Setting a logical property to False isn't an exception. Setting it to "xxx" would be, though. But if you'd still prefer to see try/except instead, I'll change it. It's actually what I started with, but had second thoughts about it before I committed. 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]
