Current location: Hot Scripts Forums » Programming Languages » Other Languages » List Problems


List Problems

Reply
  #1 (permalink)  
Old 01-06-07, 12:45 AM
spyke01 spyke01 is offline
Newbie Coder
 
Join Date: Aug 2005
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Question List Problems

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?
Reply With Quote
  #2 (permalink)  
Old 01-06-07, 11:21 AM
spyke01 spyke01 is offline
Newbie Coder
 
Join Date: Aug 2005
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
nevermind, i forgot to add the funtion to the dictionary
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
comma separated email list problems.... Alith7 PHP 16 10-16-06 11:24 AM
Some problems with drop down selection list phplearner PHP 2 07-04-05 04:08 AM


All times are GMT -5. The time now is 03:40 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.