[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ff-cvs] fenfire/org/fenfire/view/buoy doublegeometer.py
From: |
Tuomas Lukka |
Subject: |
Re: [ff-cvs] fenfire/org/fenfire/view/buoy doublegeometer.py |
Date: |
Wed, 3 Sep 2003 14:01:13 +0300 |
User-agent: |
Mutt/1.5.4i |
On Wed, Sep 03, 2003 at 07:28:45AM +0300, Matti Katila wrote:
> On Tue, 2 Sep 2003, Tuomas Lukka wrote:
> > On Mon, Sep 01, 2003 at 12:13:22PM -0400, Matti Katila wrote:
> > > -class DoubleGeometer:
> > > +class DoubleGeometer(vob.buoy.FocusViewPortsGeometer):
> > > """A class for handling the vertically split view in fenpdf.
> > > """
> > > def __init__(self):
> > > @@ -73,7 +73,7 @@
> > > def getSingle(self):
> > > return self.single
> > >
> > > - def place(self, vs):
> > > + def place(self, vs, coordinatesArray):
> > > self.height = vs.size.height
> > > self.width = vs.size.width
> > >
> > > @@ -86,5 +86,6 @@
> > >
> > > self._doset(vs)
> > >
> > > - return [(self.mainbox1,),
> > > - (self.mainbox2,)]
> > > + if len(coordinatesArray) >= 2:
> > > + coordinatesArray[0] = self.mainbox1
> > > + coordinatesArray[1] = self.mainbox2
> >
> > Umm, that's a little unstable way of saying it.
> >
> > If it's one, the system will crash really strangely.
> > Same if it's more than one.
>
> I though that -1 can be given for cs number without fear of crashing?
> At least your code does it when in single mode.
Yes, but this code doesn't place -1 anywhere if there's a problem.
Tuomas