From: Aaron S. <az...@bu...> - 2007-11-06 13:46:14
|
Hi, Whilst reviewing the documentation here: http://pythoncard.sourceforge.net/framework/components/RadioGroup.html http://pythoncard.sourceforge.net/framework/components/ComboBox.html In both cases the documentation states that there is an attribute called "selected". In fact, there is not! The only way that I can see to access the selection is using the list and the item index into the list. # this call fails -- no attribute 'selected' # print self.components.radFavoriteDrink.selected # item # this works, using list and index items = self.components.radFavoriteDrink.items # list selection = self.components.radFavoriteDrink.selection # index print "Favorite drink is", items[selection] The same thing is true with the ComboBox. Am I mistaken, or is the documentation wrong? I've also found that this approach seems to be more reliable than the documentation: for component in self.components.iterkeys(): print component, "->",type(self.components[component]) print "\t",dir(type(self.components[component])) Any thoughts? Best, Aaron |