"you need to declare the array collection as THE dataProvider of the combobox, 
so look to surround the array collection tags with <mx:dataProvider> tags"

That did seem to be the problem, and seems to relate to the solution I stumbled 
upon.  But it sure is not the impression I got from the "Createing a ComboBox 
control" section of the "Using Data-Driven Controls" of the "Adobe Flex 2 
Developer's Guide".  Where on page 396-397 of the printed edition they show a 
similar example of a Combobox that does not use the <mx:dataPrvider> tags 
followed by this quote.

"This example shows how you can take advantages of MXML defaults.  You do not 
have to use an <mx:dataProvider> tag, because dataProvider is the default 
property of the ComboBox control.  Similarly, you do not have to use an 
<mx:source> tag inside the <mx:Arraycollection> tag because source is the 
default property of the ArrayCollection class.  Finally, you do not have to 
specify an <mx:Array> tag for the source array."

This is apparently true for an inline <mx:ComboBox> control as the example 
worked as such, but when I moved it to a custom control to be reused, this 
'shortcut' failed.  It would have been nice if there where a notation to the 
exception in the documentation.  I should probably report this, do I seem to 
understand everything correctly?





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4408
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to