Tkinter canvas blow-up: bbox(ALL) == None

Randall Hopper aa8vb at yahoo.com
Tue Nov 2 07:22:02 EST 1999


Fredrik Lundh:
 |Randall Hopper <aa8vb at yahoo.com> wrote:
 |>      Apparently if the bounds of the items in a Tk canvas widget exceed
 |> MAXINT, bbox(ALL) returns None.  The attached Python script demonstrates
 |> this.
 |> 
 |>      Intuitively it seems like this is a bug since the contents of the
 |> canvas are maintained in floating point; integer bounds shouldn't be
 |> involved, should they?
 |> 
 |>      Is this a Tk bug or a Tkinter bug?
 |
 |both.
 |
 |Tkinter uses _getints instead of _getdoubles to
 |convert the bounding box to a tuple...
 |
 |...but the reason you get None instead of an over-
 |flow error is that Tk returns an empty string in this
 |case (at least in 8.0.5).


Ok, thanks for the info.  So do you know if Tk uses ints internally as
well, or is its returning the empty string an artifact of how it was fed by
Tkinter?

Randall

-- 
Randall Hopper
aa8vb at yahoo.com




More information about the Python-list mailing list