Skip to content

Feature Request: Labelset should return something else than an empty string if getlabel is called with a non-existent label #463

@balintlaczko

Description

@balintlaczko

Is your feature request related to a problem? Please describe the problem.

Currently, when I use getlabel with a non-existent identifier, I get an empty string (symbol) as a response, which is not very convenient in Max.

Describe the solution you'd like to see.

In Max, it is atypical to have an empty atom (symbol/string/list). It would be more convenient to just not get anything in return (just the "getlabel"). So, currently, we get a list: ["getlabel", ""]. If it was just ["getlabel"], it would already be much more convenient to handle. But I'm open to other solutions too.

Describe alternatives you've considered

My current hack:

Image

It works, but it would be nicer to get something easier to handle.

Additional context

This came up in the setpoint implementation for fluid.jit.plotter. Since the message can imply a new or existing identifier, I have to check if it exists in the dataset/labelset. I guess a separate contains message/method could also work, but it wouldn't be necessary if we could avoid outputting the empty symbol.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions