Skip to content

TPyDelphiObject.SetAttrO implemenation ignores setters defined by AddGetSet #360

Closed
@tomekkosinski

Description

@tomekkosinski

SetAttrO will never call defined setter:
// Only call the inherited method if the attribute exists
if GetPythonEngine.PyObject_HasAttrString(GetSelf, PAnsiChar(key)) = 1 then
Result := inherited SetAttrO(key, value);

While GetAttrO always calls at the beginning:
begin
Result := inherited GetAttrO(key);

As result setter always use RTTI while getter can use user define metod.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions