Beakie:
When I create an instance of NameValueCollection, call Add() and then call Item, blank strings are returned. Why are they blank please?
The thing that I noticed about this code is that you're passing strings around by value the whole time. I'm not sure whether that works on AVR or not. The first thing I'd try is replacing "String" with "String&" in the parameters and return values of your methods.
In case "pass by value" is unclear, I'll include this link to an avrfreaks explanation...
Beakie:
When I create an instance of NameValueCollection, call Add() and then call Item, blank strings are returned. Why are they blank please?
The thing that I noticed about this code is that you're passing strings around by value the whole time. I'm not sure whether that works on AVR or not. The first thing I'd try is replacing "String" with "String&" in the parameters and return values of your methods.
In case "pass by value" is unclear, I'll include this link to an avrfreaks explanation...
Yay, happy to hear it. Now I am interested to find out the root cause of this--I may try out some tests of my own to understand it. It's definitely good practice to pass large items by reference, but still I am interested in finding out what limits were encountered in this case.
Where is the code that just tests the subject of this thread? How are you certain tha t the code you linked to doesn't affect your NameValueCollection?
OK, I'll use simple language - where is the simplest sketch that shows how your struct works (or doesn't) that doesn't rely on other undebugged code?
I.e., just simple prints.
Clear now?
Just pulled it down to have a look-see... What is this line..?
String sReturn = "";
return sReturn;
That's a guaranteed failure right there. It's returning a reference to a temporary string, so as soon as Item() returns, the return value is pointing to nothing.