Contents

FxCustomParameterActionAPI_v4

Defines the methods the host application provides to support a custom parameter view.

Declaration

protocol FxCustomParameterActionAPI_v4

Mentioned in

Overview

Because custom parameter views can get user events at any time, this protocol provides methods to prepare the host application for parameter changes or other actions at arbitrary times.

Use the startAction(_:) and endAction(_:) commands only when the host application didn’t call your code. For example, in a custom view, the OS directly asks your view to redraw when it needs updating. At this point, the application has no point of reference for interacting with your plug-in, so you must tell it to start the communication by calling startAction(_:). In the past, if you called startAction(_:) when the host called your plug-in, there were no harmful side effects. Starting with FxPlug 4, calling startAction(_:) when the host calls your plug-in can cause hangs in the host application. Call startAction(_:) if you’re executing any code in a block that you created, such as calling dispatch_async.

You mainly need to use startAction(_:) and endAction(_:) when handling custom NSView events for custom parameters or when running code in a dispatch block that your plug-in created.

It is NOT safe to set or get parameter values at arbitrary times outside of a startAction(_:) and endAction(_:) pair. For example, when a custom parameter view receives a keyDown:positionY:keyPressed:modifiers:forceUpdate:didHandle:time: event, it may want to change its parameter value. It then calls the following sequence:

Topics

Instance Methods

See Also

Custom Parameter APIs