2 Replies Latest reply on Sep 19, 2008 4:58 AM by Antoni_H.

    Need help with objects and items

    Antoni_H. Level 1
      Hello there,

      I am trying to work with some object data stored in an array. I am adding an new object to the array with the addItem() function. This works fine... But my idea is to add object with different attribute values. The problem is that everytime I create a new object and add it to the array, the attribute values of the earlier object are overwritten by the new one. Bzzzzzz. Please some help...
        • 1. Re: Need help with objects and items
          EvolvedDSM Level 2
          I don't know what you are doing with the object 'item' and setting it to the combo box, but I've attached code of something I did quickly for you in hopes that guides you in the direction you want to go. Reply back if you have questions.
          • 2. Re: Need help with objects and items
            Antoni_H. Level 1
            I finally solved the problem by restructuring the logic. Now there is a function which creates an new Object and returning it. But there is still a problem. This new created object has no data. There is an ArrayCollection (I use it as DataProvider) which has objects with data. These objects and the new one have both same datatypes.

            Now I want the new object to fill with data from one object in the ArrayCollection.

            Do I have to copy that object or get the attribute values hardcoded...? Please help me, this seems to be a basic problem, working with object data.