Is it possible to get the class that an attribute is used within the same attribute?

Is it possible to get the class that an attribute is used within the same attribute?

For example:

TMyAttr = class(TCustomeAttribute)
constructor Create(aSelf: TObject; field: string);
end;

When I do that and use it like this: [MyAttr (self)], self is not recognised by the compiler

Comments

  1. I considered the TRTTIObject too. So, I could use the Parent property in the constructor for example? I'll try it later when back to my computer. Thanks

    ReplyDelete
  2. But on second thought Parent wouldn't work as TObject does not have a parent, right?

    ReplyDelete

Post a Comment