SetProperty / LoadProperty question in ProjectTrackerSetProperty / LoadProperty question in ProjectTracker
Old forum URL: forums.lhotka.net/forums/t/5145.aspx
tetranz posted on Wednesday, July 23, 2008
Rocky,
This might be a silly picky question but ProjectTracker, Project class has the following code. Is there a reason to use SetProperty there or would LoadProperty be more appropriate? Both seem to work.
Likewise for the Assignments property in Resources.
public ProjectResources Resources
{
get
{
if (!(FieldManager.FieldExists(ResourcesProperty)))
{
SetProperty<ProjectResources>(ResourcesProperty, ProjectResources.NewProjectResources());
}
return GetProperty<ProjectResources>(ResourcesProperty);
}
}
Ross
RockfordLhotka replied on Thursday, July 24, 2008
LoadProperty() is the correct method to call there - this is a bug in the code.Copyright (c) Marimer LLC