I think you need to show a bit more of your code.

ArrayCollection is an index based array, so as long as you are using
0(zero) as the index and not o (the letter o) then removeItemAt()
should work.  

If the error you get is a compiler error, then you aren't strongly
typing the object being referred to or you are assigning the value of
a stringly typed object to an object of type Object - that's what your
error message means.

You would get that if, for instance, you did this...

var obj:Object = <a value from somewhere else>;
var myData:ArrayCollection;

then this line would throw that compiler error...
myData = obj;

if you know that obj is an ArrayCollection then you can safely cast it
to that type during the assignment, e.g.

if (obj is ArrayCollection)
{
myData = ArrayCollection(obj);
}

or...

myData = obj as ArrayCollection;

I think you would benefit from reading the Flex developers guide on
how to use the collection objects and interfaces.

HTH

--- In [email protected], "flexawesome" <[EMAIL PROTECTED]> wrote:
>
> hummm....
> 
> 
> I got this error msg:
> 
> ===============================
> 
> Severity and Description      Path    Resource        Location        
> Creation Time   Id
> 1118: Implicit coercion of a value with static type Object to a
> possibly unrelated type mx.collections:ArrayCollection.       test.mxml
> line 69       1194139654331   151789
> 
> 
> --- In [email protected], "simonjpalmer" <simonjpalmer@>
> wrote:
> >
> > how about 
> > 
> > myData.removeItemAt(0)?
> > 
> > --- In [email protected], "flexawesome" <flexawesome@> wrote:
> > >
> > > 
> > > 
> > > Hey there,
> > > 
> > > I have a problem to remove the first *object* in myData, any
> suggestion?
> > > 
> > > Thank you 
> > > 
> > > =========================== 
> > > 
> > > 
> > > [Bindable]
> > > private var myData:ArrayCollection;
> > > 
> > > myData.removeItemAt(myData.getItemAt(0));
> > >
> >
>


Reply via email to