value(forOutputKey:ofType:)
Returns the current value on an output port (identified by its key) of the root patch of the composition.
Declaration
func value(forOutputKey key: String!, ofType type: String!) -> Any!Parameters
- key:
The key associated with an output port for the root patch of a composition. This method throws an exception if
keyis invalid. - type:
A string that specifies the class.
Return Value
The value.
Discussion
The value type depends on the type of the port type, as shown in the following table
Port type | Value type |
|---|---|
Boolean, Index, or Number | Nsnumber or any object that responds to the methods |
String | Nsstring or any object that responds to the methods |
Color | |
Image | Nsimage, Nsbitmapimagerep, |
Structure |