Max,
>In the constructor of mmRoleRules you don't do this but simply assume that the user will stick with the single string value:
>
> mmRole oRole = (mmRole)hostObject;
> this.AddRequiredField(oRole.DescriptionField);
>
>This might be fairly trivial for the experienced but wouldn't it be better to maintain consistent usage between these two related objects?
I've changed the code in the mmRoleRules constructor to the following:
public mmRoleRules(ImmBusinessRuleHost hostObject) : base(hostObject)
{
mmRole oRole = (mmRole)hostObject;
if (!mmString.Empty(oRole.DescriptionField))
{
this.AddRequiredField(oRole.DescriptionField);
}
else
{
if (oRole.DescriptionFields != null && oRole.DescriptionFields.Length > 0)
{
foreach (string DescField in oRole.DescriptionFields)
{
this.AddRequiredField(DescField);
}
}
}
}
Thanks,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com