Skip to content

An object property cannot be changed by a group change: a number field opens instead of the object picker #1782

Description

@AlexKirkouski

Description

In a grid, an object property (a property whose value is an object of a custom class - name(way(d)) below) is edited through the object picker: a double click opens the dialog with the objects to choose from.

But a group change - F12, the Group change context menu item, or the group change mode - opens a plain numeric field instead, and no object can be chosen there. The same happens for any other non-mouse way to start the edit, for example typing a character in the cell.

CLASS Way;
name = DATA STRING[50] (Way);

CLASS Doc;
way = DATA Way (Doc);
nameWay (Doc d) = name(way(d));

FORM docs
    OBJECTS d = Doc
    PROPERTIES(d) nameWay READONLYIF readonly()
;

Select the cell, press F12 (or use the Group change context menu item): a numeric editor appears; it accepts digits, rejects letters, and the property stays empty.

It is not specific to a DATA property: an ABSTRACT object property behaves the same way.

Reason

An object change without an explicit LIST is offered to the client as an input of the object's internal identifier (that is what makes it possible to push an object by its id from a custom component), and the picker dialog is opened instead of an editor of that identifier. That substitution was only done when the edit is started with the mouse, so every other way to start it - the group change among them - ends up editing the raw identifier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions