def AddObject(self, event): event.GetId() dlg = ObjDialog(self) #dlg.AddChoice(wx.ArtProvider_GetBitmap(str(ed_glob.ID_DECA_EMPTY), wx.ART_MENU, wx.Size(16, 16)), '', '') repo = Deca.world.GetLayer(Deca.World.ID_Repository) dlg.Repository = repo dlg.CurrentLayer = repo # fill templates list img = wx.ArtProvider_GetBitmap(str(ed_glob.ID_CLASS_TYPE), wx.ART_MENU, wx.Size(16, 16)) for o in repo.GetTemplatesNames(): dlg.AddChoice(img, o, o) # fill objects list img = wx.ArtProvider_GetBitmap(str(ed_glob.ID_ATTR_TYPE), wx.ART_MENU, wx.Size(16, 16)) for o in repo.GetObjects(): dlg.AddChoice(img, o.GetTitle(), o.ID) res = dlg.ShowModal() if res == wx.ID_OK: pass