Only allow Property to be visible in Designer?

I have the code to show a property in the designer, but it requries a corresponding property in the blocks editor. Is there any way to only show the property in the designer?

For example, I have this, which I want:

image

@DesignerProperty
  //(description = "The AppID to use")
  public void AppId(String id) {
    if (!appId.equals(id)) {
      appId = id;
    }
    if (appId.equals("")){
      throw new RuntimeException("appID property cannot be blank.");
    }
  }

but I also have to have this, which I do not want:

image

@SimpleProperty(description = "The AppID to use")
  public String AppId() {
    return appId;
  }

What do I need to change in my @SimpleProperty ? I am using RUSH as my extension builder.

You'll have to set userVisible param to false.

1 Like

OK thanks, how and where ?

Just after description, separated by a comma.

Many thanks, works as indicated

@SimpleProperty(description = "The AppID to use", userVisible = false)
  public String AppId() {
    return appId;
  }

but you probably like to obfuscate the app id, which would not be possible anymore if that property is only available in the designer?

Taifun

1 Like

More about "forcing the issue" for developers of setting an AppId. There is no need for the block in the Blocks Editor.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.