On 5/3/10 11:24 AM, Ed Leafe wrote: > On May 3, 2010, at 2:18 PM, Paul McNett wrote: > >> I've had this error happen a handful of times over the years, but I can't >> reproduce it. I have no idea why sometimes the dialog isn't modal at the >> time of EndModal(). If I still get error reports, I'll add a try/except >> block. > > 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). My thought was to add the try/except on PyAssertionError if the above still didn't work in all cases, which would be exceptional. 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]
