PTWin exception
Old forum URL: forums.lhotka.net/forums/t/7923.aspx
PederSvaleng posted on Saturday, October 31, 2009
CSLA 3.7.1 ProjectTracker PTWin
Maybe I'm doing something wrong here, but when fetching a project without any ProjectResources I get an exception. I works fine in the previous versions.
"Object reference not set to an instance of an object at ProjectTracker.Library.ProjectResources.Child_Fetch(Assignment[] data)....."
Any idea?JonnyBee replied on Saturday, October 31, 2009
It is fixed in samples for Csla 3.8
private void Child_Fetch(
ProjectTracker.DalLinq.Assignment[] data)
{
if (data == null) return;
this.RaiseListChangedEvents = false;
foreach (var value in data)
this.Add(ProjectResource.GetResource(value));
this.RaiseListChangedEvents = true;
}
Must check for null value before foreach.
PederSvaleng replied on Saturday, October 31, 2009
Ah.. That makes sense :)
I was sure that I compared it with another PTLibrary...
Thanks Jonny!Copyright (c) Marimer LLC