Just confirmed it works with enums as you showed it, and even without needing the cast to integer:
namespace ConsoleApplication22;
type
Program = class
public
class method Main(args: array of String): Int32;
begin
// add your own code here
writeLn('The magic happens here.');
end;
property DisplayAngle: Boolean index pfDisplayAngle Read GetFlags Write SetFlags;
property DisplayRadius: Boolean index pfDisplayRadius Read GetFlags Write SetFlags;
method GetFlags(a: Foo);
begin
end;
method SetFlags(b: Boolean; a: Foo);
begin
end;
end;
Foo = public enum(pfDisplayAngle, pfDisplayRadius);
end.
I just installed 2755 to try it out. Works … - but for true compatibility there is one exception: the setter method should take “Index” as parameter 1, “Value” as parameter 2. It’s hardly worth mentioning, just for the sake of completeness.
But for me it would be ok.
Thanks again.
Werner
From the original documentation: “… for a write procedure, it must be the second-to-last parameter (preceding the parameter that specifies the property value).”