All pastes #262570 Raw Edit

Baptiste

public python v1 · immutable
#262570 ·published 2006-11-30 18:04 UTC
rendered paste body
class Start:        def __init__(self):                self.Bind(EVT_CHOOSE, self.listChose)        def listeChoix(self,evt):                urls = evt.urls                titles = evt.titles                print urls                print titles                object_s = wx.SingleChoiceDialog(self, labelO, labelV, titles, wx.CHOICEDLG_STYLE)                if object_s.ShowModal() == wx.ID_OK:                        title = object_s.GetStringSelection()                        url = urls[titles.index(title)]                        object_s.Destroy()                else:                        object_s.Destroy()                        error = wx.MessageDialog(self,errorChose,TitleError,wx.ICON_ERROR|wx.OK)                        error.ShowModal()                        return        def onPushButton(self):                self.v_search = Search(self,self.url.GetValue())                self.v_search.start()class Search:    ...    if len(urls) > 1:         evt = Choose(urls = urls, titles = titles)         wx.PostEvent(self.parent, evt)         return None,None