[OGo-Developer] stuffing an NSArray into a NSMutableDictionary

Sebastian Reitenbach developer@opengroupware.org
Mon, 23 Apr 2007 07:22:39 +0200


Hi Rafel,
> Sebastian,
> 
> if I have understood the question, the initial value of
> self->multipleReturn is something like that:
> 
[input array]
> 
> 
> with two queues  l00-bugdead-prods-queue and l01-bugdead-prods-queue
> and the final value must be an array with two dictionaries, one for each 
> queue?
yes, exactly, the input array can be an arbitrary number of queues.

I expect the output array to have the following structure:
self->multipleReturn (
  {   Queue = " l00-bugdead-prods";
      Abandoned = " 0";
      Calls = " 0";
      Completed = " 0";
      ...
      Agents = (
        {
          Event = " QueueMember";
          LastCall = " 0";
          Location = " Agent/203";
          Queue = " l00-bugdead-prods-queue";
          ...
        },
        {
          Event = " QueueMember";
          LastCall = " 0";
          Location = " Agent/103";
          Queue = " l00-bugdead-prods-queue";
          ...
        };
      );
  },
  {   Queue = " l01-bugdead-prods-queue";
      Abandoned = " 0";
      Calls = " 0";
      Completed = " 0";
      ...
      Agents = (
        {
          Event = " QueueMember";
          LastCall = " 0";
          Location = " Agent/203";
          Queue = " l01-bugdead-prods-queue";
          ...
        },
        {
          Event = " QueueMember";
          LastCall = " 0";
          Location = " Agent/103";
          Queue = " l01-bugdead-prods-queue";
          ...
        };
      );
  };
)


> 
> 
> Can you trie the following code:
> 
[your code]

I'll try at the evening today, but I am not sure whether it really does what 
I need. You are doing a lot of work in the if clause, I did a lot in else. I 
need to see it working, I'll let you know.

thanks 
Sebastian