You might want to look at list, map or set (though for this it would be either set or list, depending on your need to keep the sequence of the objects).

I don't know about unpacking lists or sets, but you can create a list of containers, and then you can extract each container again, using a listiterator or setiterator :

void MyFunction()
{
    set MySet;
    setiterator MyIterator;
    container c;

    MySet = new set(Types::container);

    MySet.add([some objects in one container]);
    MySet.add([some objects in one container]);

    MyIterator = new setIterator(MySet);
    while (MyIterator.more())
    {
        c = MyIterator.value();

        .... whatever you want to do with the container....

        MyIterator.next();
    }
}

This is just typed from memory, but it shoud give you an idea about what to to in Axapta. Lists and maps follow the same basic model....

Good luck unpacking the containers from the list/set/map :-)

Regards

    Palle M�lgaard




________________________________

      From: Matt Benic [mailto:[EMAIL PROTECTED]
      Sent: 18. februar 2005 13:28
      To: Axapta Dev
      Subject: [development-axapta] Container within a container
     
     
     
      Hi all,
      I'm facing a bit of a coding dilemma. I am writing a .Net app that requests
      all customers altered in axapta after a certain time. I'm using the Business
      Connector to do this. I have written utilities that allow me to 'unpack' a
      container packed by an Axapta object and passed through COM. In this case
      though, I need to be able to return multiple objects.
      If I use conins to add the individual containers to the single container,
      the individual items in each container just get added (rather than just
      having a nested container). Is there another way to add these? I do not want
      to have to know how far into the container to look for each object, since
      the utilities I have written are designed to automatically populate new
      csharp objects with a prticular attribute defined.
      Alternatively, is there some other collection model I can use to copy my
      containers into so that they all come across as separate containers?
     
      I hope I am making sense..
     
      Regards and thanks,
     
      Matt Benic
      Axapta and .Net Developer
      UTi Sun Couriers Division
     
      "The universal aptitude for ineptitude
      makes any human accomplishment an incredible miracle."
      - Col. John P. Stapp
      www.smallfrymobile.com
     
     
     
     
     
     
________________________________

      Yahoo! Groups Links
     

      *      To visit your group on the web, go to:
            http://groups.yahoo.com/group/development-axapta/
             
      *      To unsubscribe from this group, send an email to:
            [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
             
      *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]






Yahoo! Groups Links

Reply via email to