If floortasks is a component, then this makes no sense:

taskList = XMLList(resultXML.floortasks);

 

You need to use the xml data for the dataProvider not the component.

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 

________________________________

From: [email protected] [mailto:[email protected]] On
Behalf Of markgoldin_2000
Sent: Saturday, February 21, 2009 6:23 AM
To: [email protected]
Subject: [flexcoders] Re: ToggleButtonBar xml based dataProvider

 

No, can't get it work:
taskList = XMLList(resultXML.floortasks);
floorTasks.dataProvider = taskList;

floorTasks is my ToggleButtonBar. I am getting:
The dataProvider of 'floorTasks' must not contain objects of type 
flash.display.DisplayObject.
With XMLListCollection I am getting:
taskList = XMLListCollection(resultXML.floortasks);
floorTasks.dataProvider = taskList;
Type Coercion failed: cannot convert xmll...@52e5901 to 
mx.collections.XMLListCollection

This works without errors:
taskList = Array([resultXML.floortasks]);
floorTasks.dataProvider = taskList;

But I am getting just one button with no text.

My data is this:
<label>BOXING</label>
<label>CUTTING</label>
<label>GENERAL LABOR</label>
<label>MACHINE OPERATORS</label>
<label>PACKING</label>
<label>QUILTING</label>
<label>SEWING</label>
<label>SILO FILLERS</label>

Thanks for help.

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Tracy Spratt" <tspr...@...> wrote:
>
> Certainly. Why would you think not?
> 
> 
> 
> Though to speak accurately, you would use XMLList or 
XMLListCollection
> as the dataProvider.
> 
> 
> 
> Tracy Spratt 
> Lariat Services 
> 
> Flex development bandwidth available 
> 
> ________________________________
> 
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>

[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of markgoldin_2000
> Sent: Friday, February 20, 2009 3:46 PM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] ToggleButtonBar xml based dataProvider
> 
> 
> 
> Is that possible?
> 
> Thanks
>



Reply via email to