MG: added some component rename checks

git-svn-id: trunk@1424 -
This commit is contained in:
lazarus 2002-02-09 02:30:48 +00:00
parent e70cbdf3a2
commit 5c326caa41

View File

@ -3181,6 +3181,8 @@ end;
procedure TComponentNamePropertyEditor.SetValue(const NewValue: ansistring);
begin
if (not IsValidIdent(NewValue)) or (NewValue='') then
raise Exception.Create('Component name "'+NewValue+'" is not a valid identifier');
inherited SetValue(NewValue);
PropertyHook.ComponentRenamed(TComponent(GetComponent(0)));
end;