[wxpython-users] a few stupid questions ...
Christopher Barker
Chris.Barker at noaa.gov
Mon Apr 28 09:59:35 PDT 2008
Stef Mientki wrote:
> I tried this
> class Message ( object ) :
> def __init__ ( self ) :
> pass
> def ok ( self, caption = '', message = '', parent = None ) :
> wx.MessageDialog ( parent, message, caption,
> style = wx.OK | wx.ICON_INFORMATION )
>
> But that gives the following error:
> unbound method ok() must be called with Message instance as first
> argument (got str instance instead)
Did you instantiate a Message instance?
Maybe you want a static method, or just a plain old function in a module.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the wxpython-users
mailing list