--- In flexcoders@yahoogroups.com, "pmotzfeldt" <[EMAIL PROTECTED]> wrote:
>
> Hi, I am playing with the automation API, to be able to automate events.
> 
> I am having a problem with the Combobox. I have just created a simple
> combobox as shown below. I works great in the application. But my
> problem is that the itemRenderer is null, which is probably right.
> 
> I am able to open the combobox with the automation api, but when I try
> to select an item with mx.automation.events.ListItemSelectEvent, it
> needs an itemRenderer (mx.controls.listClasses.ListItemRenderer).
> SInce the combobox's itemRenderer is null, I can't use that, so do I
> need to create an itemRenderer?
> 
> Does anyone know how I do this?
> 
> (I use the replayAutomatableEvent in the automationManager class to
> perform the events)
> 
> <mx:ComboBox id="cbCombo" automationName="cbCombo">
>   <mx:dataProvider>
>      <mx:Array>
>       <mx:String>Test1</mx:String>
>       <mx:String>Test2</mx:String>
>      </mx:Array>
>   </mx:dataProvider>
> </mx:ComboBox>
>

I got an answer on this question from Adobe, if any is interested..

The thing I wanted to to, was to automate an selection of element with
value for ex "Test2".

To do this I needed to iterate over the automationchildren of the
combobox, and compare the value Test2 with the automationValue, and
use the automationChild with this value as the itemRenderer in the
ListItemSelectEvent.

Works great.

Peter

Reply via email to