Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Store duplicate Array values to another Array

    Hi flex coders,

    As the title says it all, how will I do this in flex? Like for example I have the values 1,1,1,2,2,3. All the duplicated entries need not to be remove but will just be stored in another collection.

    Need some light. Please help!


    Best Regards,

  • #2
    Regular Coder Stooshie's Avatar
    Join Date
    Mar 2008
    Location
    Dundee, Scotland
    Posts
    380
    Thanks
    9
    Thanked 39 Times in 39 Posts
    var a : ArrayCollection = new ArrayCollection(array);
    var b : ArrayCollection = new ArrayCollection(a.source);

    or

    Use mx.utls.ObjectUtil.Copy

    var arrayCollection1 : ArrayCollection = ObjectUtil.copy(arrayCollection2);
    Regards, Stooshie
    O


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •