Hi guys im a newb at python and ive just started playing around tonight. Im building and inventory manager based off of pyWine from learningpython.com im trying to creat a list deleter and having problems, heres my function:
Code:
def OnDelItem(self, widget):
"""Called when the user wants to delete an item"""
# Get the selection in the gtk.TreeView
self.item = event.GetIndex()
"""Actually delete the item"""
self.itemList.DeleteItem(self.item)
The list is called itemList, i also tried this to no effect:
Code:
def OnDelItem(self, widget):
"""Called when the user wants to delete an item"""
# Get the selection in the gtk.TreeView
selection = self.itemView.get_selection()
"""Actually delete the item"""
self.itemList.remove(selection)
I also did several google searches, any ideas on fixing this guys?