Choose Literal of Specific Enum as value

Issue #244 resolved
Calem Bendell created an issue

There should be, I think, a way to select specific values of enums in the scope.

e.g.

        myLineImage = new MinuetoImage(400, 400);
        myLineImage.drawLine(MinuetoColor.BLACK, 0, 0, 200, 200);

There doesn't seem to be a way to access MinuetoColor.BLACK from TouchCORE.

Comments (5)

  1. Matthias Schoettle

    References #244: Adds an EnumLiteralValue as a sub-class to ValueSpecification, which has a reference to a specific REnumLiteral. Also adds the generated code.

    → <<cset e36dae677e8c>>

  2. Matthias Schoettle

    References #244: Changes the item provider for EnumLiteralValue to have the textual representation include the enum's name (e.g., Enum.Literal).

    In addition, the property descriptor for the value property (REnumLiteral) filters out everything except literals from extended aspects and the label provider uses the same textual representation as described above.

    → <<cset 0c85e5d1a7ae>>

  3. Matthias Schoettle

    Resolves #244: Adds the option to choose and use an enum literal as the value when using the ReferenceAndValueHandler.

    Also extends the controller to create the corresponding EnumLiteralValue when an REnumLiteral is chosen by the user.

    → <<cset 03cbe459c871>>

  4. Log in to comment