RAD Studio (Common)
ContentsIndex
PreviousUpNext
E2274: property attribute 'label' cannot be used in dispinterface (Delphi)

You have added a label to a property defined in a dispinterface, but this is disallowed by the language definition.

program Problem;

  type
    T0 = dispinterface
      ['{15101510-1510-1510-1510-151015101510}']
      function R : Integer;
      property value : Integer label 'Key';
    end;

begin
end.

Here an attempt is made to use a label attribute on a dispinterface property.

program Solve;

  type
    T0 = dispinterface
      ['{15101510-1510-1510-1510-151015101510}']
      function R : Integer;
      property value : Integer;
    end;

begin
end.

The only solution to this problem is to remove label attribute from the property definition.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!