I'm new to wxpython and reading and playing with examples, I get to an
issue. What is the difference in the two examples?
--- example 1
import wx
import wx.lib.dialogs
application = wx.PySimpleApp()
# Create a list of choices
choices = [ 'Red', 'Blue', 'Green', 'Pink', 'White' ]
# Create the dialog
dialog = wx.lib.dialogs.singleChoiceDialog ( None, 'Pick something....', 'Dialog Title', choices )
--- end example 1
and
--- example 2
from wxPython.wx import *
from wxPython.lib.dialogs import *
application = wxPySimpleApp()
# Create a list of choices
choices = [ 'Red', 'Blue', 'Green', 'Pink', 'White' ]
# Create the dialog
dialog = wxSingleChoiceDialog ( None, 'Pick something....', 'Dialog Title', choices )
# Show the dialog
dialog.ShowModal()
# Destroy the dialog
dialog.Destroy()
--- end example 1
In particular, why in the first example dialog.ShowModal() and
dialog.Destroy() are not available and produce errors?
I would be gratefull for any explaination,
Best regards
Seweryn Kokot