Select to view content in your preferred language

Could not resolve <mx:Object> to a component implementation.

1100
2
05-04-2011 08:34 AM
PeteVitt
Frequent Contributor
Hi I'm getting the subject error in the code below - this is an mxml component -- any ideas?  I've tried just strings instead of objects and get the same errors

<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
   xmlns:s="library://ns.adobe.com/flex/spark"
   xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:esri="http://www.esri.com/2008/ags"
   width="400" height="300"
   initialize="OnInitialize()">

<s:ButtonBar id="TogBar" itemClick="TogBarClickHandler(event);">
  <mx:ArrayCollection>
    <mx:Object icon="@Embed(source='images/identify_1.png')"/>
    <mx:Object icon="@Embed(source='images/zoomin_1.png')"/>
    <mx:Object icon="@Embed(source='images/zoomout_1.png')"/>
    <mx:Object icon="@Embed(source='images/pan_1.png')"/>
    <mx:Object icon="@Embed(source='images/FullExtent.png')"/>
  </mx:ArrayCollection>
</s:ButtonBar>
</s:Group>

Thanks

Pete
Tags (2)
0 Kudos
2 Replies
ReneRubalcava
Esri Frequent Contributor
You should wrap the collection in a dataprovider and use the fx namespace for object.
    <s:ButtonBar>
        <s:dataProvider>
            <s:ArrayCollection>
                <fx:Object />
            </s:ArrayCollection>
        </s:dataProvider>
    </s:ButtonBar>
0 Kudos
PeteVitt
Frequent Contributor
Thanks - that worked -- I also had a mixture of mx and s tags within the buttonbar
0 Kudos