Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 435C29137 for ; Mon, 2 Apr 2012 20:31:45 +0000 (UTC) Received: (qmail 75978 invoked by uid 500); 2 Apr 2012 20:31:44 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 75950 invoked by uid 500); 2 Apr 2012 20:31:44 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 75942 invoked by uid 99); 2 Apr 2012 20:31:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Apr 2012 20:31:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Apr 2012 20:31:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 5C5E5354A4B for ; Mon, 2 Apr 2012 20:31:23 +0000 (UTC) Date: Mon, 2 Apr 2012 20:31:23 +0000 (UTC) From: "Josh Tynjala (Commented) (JIRA)" To: flex-dev@incubator.apache.org Message-ID: <1202567982.2721.1333398683424.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <151624166.2565.1333397483664.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (FLEX-36) Add Vector implementations of IList and ICollectionView MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FLEX-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13244566#comment-13244566 ] Josh Tynjala commented on FLEX-36: ---------------------------------- I guess using the top-level Array function to do the conversion to simply use an ArrayList or ArrayCollection is the obvious easy thing to do: var myArray:Array = Array(myVector); But it always feels weird not to have dedicated collections for Vectors. I realize that we can't type custom classes like collections, so we lose the advantage of vectors, but I always twitch a little when I need to first convert to an Array and then wrap in the collection. I'd be happy to do a code review. > Add Vector implementations of IList and ICollectionView > ------------------------------------------------------- > > Key: FLEX-36 > URL: https://issues.apache.org/jira/browse/FLEX-36 > Project: Apache Flex > Issue Type: Improvement > Reporter: Josh Tynjala > Assignee: Bertrand Delacretaz > Priority: Minor > Labels: List, collections > > VectorList and VectorCollection, similar to ArrayList and ArrayCollection. Feels weird that I need to convert Vectors to Arrays to use in Flex collections. > In case anyone is unaware, you can cast Vector. as Vector.<*>. Works with the "as" and "is" keywords, as you can see below: > var strings:Vector. = new ["One", "Two", "Three"]; > trace(strings is Vector.<*>); //true > var generic:Vector.<*> = strings as Vector.<*>; > trace(strings) //One, Two, Three -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira