0 Replies Latest reply on Oct 13, 2006 1:06 PM by stratosnatcher

    Can you force pass by value?

    stratosnatcher
      I have a component that gets an Array of objects passed to it. I tried pushing the objects one-by-one onto the member array. This may have worked, but I had to use an ArrayCollection to get data binding to work. So, now I'm using the addItem() method of the member ArrayCollection to "push" the objects from the passed in array.

      Unfortunately, this is just passing references to the objects. When I have two component instances, each of which has the same array of objects passed in, the two instances start "fighting" each other because they're using references back to the same Array/Objects.

      Is it possible to force a by-value copy of these objects or the entire array?