This project is read-only.
1
Vote

Object null exception

description

When trying to do an export an object null exception occure.
This is due to the code is using _sourcefields as lookup - both for source AND target.
a solution would be to change the following method:
private string GetValue(string name, SortedList<string, Field> sortedlistToUse)
    {
        Field f;
                    sortedlistToUse.TryGetValue(name, out f);
 
        return f.ReferenceName;
    }
and pass in the sortedlist that shall be used for the lookup:
 
xw.WriteAttributeString("LeftName", GetValue(item.SubItems[0].Text,_sourceFields));
                xw.WriteAttributeString("RightName", GetValue(item.SubItems[1].Text, _targetFields));

file attachments

comments