I am working with the MBSChartDirector which gets its data from a single element array. If I could figure out how to use a two element array, the present issue would not exist. To create a chart that needs several arrays to populate it, I loop through my recordset and create the array of Doubles to send to the chart control. I then assign the array to the first value in a dictionary. I go through the rest of my recordsets creating anywhere from one to six more arrays. Unfortunately, while the key for each dictionary value has the proper name for that array, the dictionary values are all the same (the first one entered). I have read that you can’t have an array of arrays and it appears you can’t have a dictionary of them either. Is this true or am I doing something wrong?
Perhaps a better way of doing this is to process the record sets in a function that would return the array as it is being sent to the chart control.
I had the same problem. See the thread on the RB NUG where this was explained to me and it makes perfect sense. The array is not copied into the dict, only a pointer to it so you must recreate one for each entry - within not outside, the loop. Subtle.