Universal Robots Forum

Bug when trying to store string with #

When adding anything after this sign (#), the string won’t be stored in the model after i revisit the node, like shown in the picture. Code is below:
bug1
After revisiting the node
bug2

@Input(id = INPUT_COMMAND_ID)
public void onChangeInputCommand(InputEvent event)
{
    if(event.getEventType() == InputEvent.EventType.ON_CHANGE)
    {
        this.model.set("COMMAND",this.inputCommand.getText());
    }
}
@Override
public void openView() {
    this.inCommand.setText(model.get("COMMAND",""));
}
1 Like

I can confirm this.
I would use this workaround:
before storing the value in the model, replace "#" by something like this: "&hashmark;" and vice versa in the openView before filling the textfield.
Maybe other characters are also affected. Anyone @DevelopmentSupport?

1 Like

some thoughts later:
# is used as comment start in urscript.
textmsg ("#") gives an error, while textmsg (".#") works.
-> issue when using # without non white space character before it.

1 Like