mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 22:49:30 +02:00
IdeIntf: Replace a test + exception with an assertion in PropEdits.
git-svn-id: trunk@56027 -
This commit is contained in:
parent
7aac35e702
commit
cf2c1e8b43
@ -4626,15 +4626,13 @@ begin
|
||||
{$IFDEF VerboseMethodPropEdit}
|
||||
debugln(['TMethodPropertyEditor.Edit NewValue="',NewMethodName,'"']);
|
||||
{$ENDIF}
|
||||
if not IsValidIdent(NewMethodName) then
|
||||
raise EPropertyError.Create('Method name "'+NewMethodName+'" must be an identifier');
|
||||
Assert(IsValidIdent(NewMethodName),'Method name "'+NewMethodName+'" must be an identifier');
|
||||
NewMethodName:=PropertyHook.LookupRoot.ClassName+'.'+NewMethodName;
|
||||
{$IFDEF VerboseMethodPropEdit}
|
||||
debugln(['TMethodPropertyEditor.Edit CreateMethod "',NewMethodName,'"...']);
|
||||
{$ENDIF}
|
||||
SetMethodValue(
|
||||
PropertyHook.CreateMethod(NewMethodName, GetPropType,
|
||||
GetComponent(0), GetPropertyPath(0)));
|
||||
SetMethodValue(PropertyHook.CreateMethod(NewMethodName, GetPropType,
|
||||
GetComponent(0), GetPropertyPath(0)));
|
||||
{$IFDEF VerboseMethodPropEdit}
|
||||
debugln(['TMethodPropertyEditor.Edit CHANGED new method=',GetValue]);
|
||||
{$ENDIF}
|
||||
|
Loading…
Reference in New Issue
Block a user