Works like a charm, thanks.

--- In [email protected], "Jason Hawryluk" <[EMAIL PROTECTED]> wrote:
>
> depending on your "post". I would think that.
> 
> var myPost:Post = Post(allPosts.getItemAt(index));
> 
> would normaly cast it to it's proper type...
> 
> Make sure that you import your class befor using it. As i'm assuming you
> have.
> 
> Jason
> 
> 
>   -----Message d'origine-----
>   De : [email protected]
[mailto:[EMAIL PROTECTED] la
> part de svolix
>   Envoyé : dimanche 5 mars 2006 07:31
>   À : [email protected]
>   Objet : [flexcoders] ArrayContainer trouble
> 
> 
>   I'm storing instances of a custom component called a Post into an
>   ArrayContainer, which I'm using as a data provider for another
>   component built to store and visually render all Posts.
> 
>   Unfortunately, the compiler gives me an error on the following code:
>   var myPost:Post = allPosts.getItemAt(index);
> 
>   The error in question is "Implicit coercion of a value with static
>   type 'Object' to a possibly unrelated type 'Post'".  In other words,
>   despite my having stored only Posts into the ArrayContainer, getItemAt
>   only returns elements of type Object.
> 
>   Is there a C-like casting mechanism I can use in this situation?  Or
>   is some other workaround appropriate?
> 
>   Thanks.
> 
> 
> 
> 
> 
>   --
>   Flexcoders Mailing List
>   FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>   Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
> 
> 
> 
>   SPONSORED LINKS Web site design development  Computer software
development
> Software design and development
>         Macromedia flex  Software development best practice
> 
> 
>
----------------------------------------------------------------------------
> --
>   YAHOO! GROUPS LINKS
> 
>     a..  Visit your group "flexcoders" on the web.
> 
>     b..  To unsubscribe from this group, send an email to:
>      [EMAIL PROTECTED]
> 
>     c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
> 
> 
>
----------------------------------------------------------------------------
> --
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to