RadioGroup/ComboBox -- documentation error?

"Aaron Stevens" <[email protected]>
Newsgroups gmane.comp.python.pythoncard
Message-ID <015001c8207a$f1cc0dc0$6401a8c0@AZSLAPTOPIBM>
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


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.