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-----I'm storing instances of a custom component called a Post into an
De : [email protected] [mailto:[EMAIL PROTECTED]De la part de svolix
Envoyé : dimanche 5 mars 2006 07:31
À : [email protected]
Objet : [flexcoders] ArrayContainer trouble
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
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

