Contents

addCustomParameter(withName:parameterID:defaultValue:parameterFlags:)

Creates a custom parameter and adds it to the plug-in’s parameter list.

Declaration

func addCustomParameter(withName name: String, parameterID: UInt32, defaultValue: any NSCopying & NSSecureCoding & NSObjectProtocol, parameterFlags flags: FxParameterFlags) -> Bool

Parameters

  • name:

    Name of the parameter in the user interface.

  • parameterID:

    Unique identifier for a parameter. Used to retrieve, set, or validate the parameter.

  • defaultValue:

    Initial entry for the parameter.

  • flags:

    Flags that encode various state values for the parameter.

Return Value

Returns YES if the application successfully creates a custom parameter; NO otherwise.

Discussion

The defaultValue argument is an instance, created by the plug-in, of the custom parameter’s class, which must conform to the NSCoding protocol. NSCoding is used for serializing and unserializing the custom parameter’s value object for saving and loading.

See Also

Instance Methods