From: Steven M. <sr...@us...> - 2006-01-15 06:35:38
|
Update of /cvsroot/instantobjects/Source/ObjectFoundry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4100 Modified Files: OFExpert.pas Log Message: Fix for EOleException in MM when cancelling the dialog during the addition of a new IOAttribute. Needed to add property parameter validation in function TObjectFoundryExpert.GetAttributeType. Index: OFExpert.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/ObjectFoundry/OFExpert.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OFExpert.pas 24 Feb 2005 00:27:21 -0000 1.3 --- OFExpert.pas 15 Jan 2006 06:35:31 -0000 1.4 *************** *** 252,272 **** const P: IMMProperty): TIOAttributeType; begin ! with TMMCodeAttribute.Create(P) do ! try ! case AttributeType of ! atPart: ! Result := ioaPart; ! atParts: ! Result := ioaParts; ! atReference: ! Result := ioaReference; ! atReferences: ! Result := ioaReferences; ! else ! Result := ioaSimple; ! end; ! finally ! Free; ! end; end; --- 252,275 ---- const P: IMMProperty): TIOAttributeType; begin ! if Assigned(P) and P.Valid then ! with TMMCodeAttribute.Create(P) do ! try ! case AttributeType of ! atPart: ! Result := ioaPart; ! atParts: ! Result := ioaParts; ! atReference: ! Result := ioaReference; ! atReferences: ! Result := ioaReferences; ! else ! Result := ioaSimple; ! end; ! finally ! Free; ! end ! else ! Result := ioaNoAttribute; end; |