wxMessageDialog questions

I'm new to wxPython, following some example code in the wiki, and
have a couple of questions.

I'm fooling around with events & the menu bar. Following the example
code, I've created a method that builds a wxMessageDialog object.
Calling that object spits the following error to my shell:

  Traceback (most recent call last):
    File "./foo.py", line 40, in OnAbout
      dlg = wxMessageDialog(self, "Fubar", wxOK)
    File "//Library/Python/2.3/wx-2.5.3-mac-ansi/wx/_windows.py", line 2831, in __init__
      newobj = _windows_.new_MessageDialog(*args, **kwargs)
  TypeError: String or Unicode type required

I'm running this on a Mac, osx v10.3.8, with yesterday's download of
wxPython (v2.5) -- ansi version.

Any suggestions?

Also, I've tried to find the source of the problem by looking through
the online docs. But I can't find doco on wxMessageDialog in the
http://www.wxpython.org/onlinedocs.php --> Classes by category -->
wxDialog page. What's/where's the best place to look for API doco?

Thanks in advance!
Scott

Got it! One more question for now:

dlg = wx.MessageDialog(self, "Fubar", "A caption", wx.OK)

Is "self" the object's parent in this example?

Thanks
Scott

···

On Mar 8, 2005, at 1:49 PM, Chris Barker wrote:

wxMessageDialog::wxMessageDialog

wxMessageDialog(wxWindow* parent, const wxString& message, const wxString& caption = "Message box", long style = wxOK | wxCANCEL, const wxPoint& pos = wxDefaultPosition)

So you need one more string before the wxOK flag, the caption.