Andre Emanuel Bernardo Almeida wrote:
> Hello,
>
> i'm working on a aplication that uses floatcanvas and i just found that
> in windows when a do something like x=BBox(...);x==None it crashs.
> i tried it in more than one machine and it happens in all of them.
> i created a file that replicates the error. please try it and tell me
> what to do.
It's like the old joke:
Patient: Doctor, it hurts when I do this! What can I do?
Doctor: Don't do that!
In general, something == None is not reliable. In particular, it doesn't
work with numpy arrays, and BBox is a subclass of numpy arrays. Use "is
None" instead:
import wx.lib.floatcanvas.Utilities.BBox as B
x = B.asBBox([[5,5],[6,6]])
if x is None:
something..
should work fine.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
_______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas