parameters: (self,widgetNames)
return_statement: return dataMap
docstring: Collect data from a widget hierachy by names into a dictionary.
  		This can only handle UNIQUE widget names (in the hierachy)
  		and will raise a RuntimeError if the number of matching widgets
  		is not equal to one.
  
  		Usage::
  		  data = guiElement.collectDataAsDict(['myTextField','myListBox'])
  		  print "You entered:",data['myTextField']," and selected ",data['myListBox']
docstring_summary: Collect data from a widget hierachy by names into a dictionary.
  		This can only handle UNIQUE widget names (in the hierachy)
  		and will raise a RuntimeError if the number of matching widgets
  		is not equal to one.
docstring_tokens: Collect data from a widget hierachy by names into a dictionary . This can only handle UNIQUE widget names ( in the hierachy ) and will raise a RuntimeError if the number of matching widgets is not equal to one .
function: def collectDataAsDict(self,widgetNames):
  		"""
  		Collect data from a widget hierachy by names into a dictionary.
  		This can only handle UNIQUE widget names (in the hierachy)
  		and will raise a RuntimeError if the number of matching widgets
  		is not equal to one.
  
  		Usage::
  		  data = guiElement.collectDataAsDict(['myTextField','myListBox'])
  		  print "You entered:",data['myTextField']," and selected ",data['myListBox']
  
  		"""
  		children = self.getNamedChildren(include_unnamed=True)
  		dataMap = {}
  		for name in widgetNames:
  			widgetList = children.get(name,[])
  			if len(widgetList) != 1:
  				if get_manager().debug:
  					self.listNamedWidgets()
  				raise RuntimeError("CollectData can only handle widgets with unique names.")
  
  			dataMap[name] = widgetList[0].getData()
  		return dataMap
function_tokens: def collectDataAsDict ( self , widgetNames ) : children = self . getNamedChildren ( include_unnamed = True ) dataMap = { } for name in widgetNames : widgetList = children . get ( name , [ ] ) if len ( widgetList ) != 1 : if get_manager ( ) . debug : self . listNamedWidgets ( ) raise RuntimeError ( "CollectData can only handle widgets with unique names." ) dataMap [ name ] = widgetList [ 0 ] . getData ( ) return dataMap