From: Andy T. <an...@ha...> - 2005-10-12 09:53:47
|
Alex Tweedly wrote: > bra...@om... wrote: > >> >> I've only tried this on a couple of the more complex child windows, >> but so >> far so good. The only trouble I ran into was a ZeroDivisionError. >> >> Traceback (most recent call last): >> File "/OMS/dev/main/OMS/Mycroft/source/client/simpleSizer.py", line >> 44, in RecalcSizes >> scaleX = 100 * curWidth / minWidth >> ZeroDivisionError: integer division or modulo by zero >> >> It turned out that this error went away after I made sure the child >> window >> that generated was resizeable. >> > I haven't been able to get this to happen (I had tested on > non-resizeable windows). The error happens in ReCalcSizes which is only > called when the window is resized; if the window is marked as > "non-resizeable" then I don't really see why it should be in that > section of code at all. Anything unusual about the window/app this > happened in ? (I checked it again on Mac just in case it was platform > dependent - my earlier testing was Win only - but I don't get an error > there either). > > I've put in a safety check - could you please test this (file attached) > >> I vote for simpleSizer to go into PythonCard CVS ASAP. It's not going >> to break >> anything else because nothing else is dependent on it yet. It's a great, >> super-easy way to add sizers to PythonCard. It obviously hasn't been >> tested >> in every scenario, and it's not perfect, but it's far better than no >> sizers at all. >> It's also very in keeping with the PythonCard spirit of shallow >> learning curve. >> And putting it out there at will net us a lot more testers. Why wait >> for 2.0? > > That sounds reasonable to me. > Anyone object ? Or have other thoughts on adding this to CVS ? > > -- > Alex Tweedly http://www.tweedly.net > > I say go for it. I'm giving a presentation at the Australian open source developer's conference [1] in about six weeks and this will help answer the first question I'll get [2]. As Brad says it doesn't impact or break any other part of the framework, and if it's in CVS I'm more likely to test it. Regards, Andy [1] http://www.osdc.com.au/ [2] Which is always "when will you support sizers" -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ |