Custom Data Reference Config String anomoly

Discussion created by MaxStrueverWipro on Feb 27, 2012
Latest reply on Feb 28, 2012 by rdavin

I am having a really strange issue arise with the config string of my custom data reference plugin. 


The configString is re-generated based on an internal object/internal variables on every Get. This is so that we get a consistently formatted configString every time. Here is my ConfigString override 



public override string ConfigString
                internalEquationConfig = new EquationDRConfig(internalConfigString);
                return internalEquationConfig.ConfigString;
                if (ConfigString != value)//if the new value is different from what is already stored
                    if (value != null)
                        internalConfigString = value.Trim();
                    // notify SDK and clients of change.  Required to have changes saved/checked in.



when I create attributes programmatically, I get VERY inconsistent results with the configString. 


I create three attributes in a row, with the same configStrings, but only one or two of the three ends up saving the correct configString. 


when I debug the issue in Visual Studio and look at the internals of the attribute, I get these strange results.




In the third instance here, the private configString, the public ConfigString, the public DataReference and the private dataReference all have matching strings, which is what I would expect to happen. 


in the first two screen caps, you can see the inconsistencies between these four variables.


I created three attributes programmatically with the exact same code (except the attribute name), and set the same configString, and still get this strange inconsistency where only the second attribute shows the proper configString as it was set up.




what reason could this be happening on such an inconsistent basis?