Automator Changes for Swift
Automator
Removed AMShellScriptAction.inputFieldSeparator() -> String!
Removed AMShellScriptAction.outputFieldSeparator() -> String!
Removed AMShellScriptAction.remapLineEndings() -> Bool
Added AMWorkflow.init()
Modified AMAction
Declaration | Introduction | |
---|---|---|
From | class AMAction : NSObject { init!(definition dict: [NSObject : AnyObject]!, fromArchive archived: Bool) init!(contentsOfURL fileURL: NSURL!, error outError: NSErrorPointer) var name: String! { get } var ignoresInput: Bool { get } var selectedInputType: String! var selectedOutputType: String! var progressValue: CGFloat func runWithInput(_ input: AnyObject!, fromAction anAction: AMAction!, error errorInfo: AutoreleasingUnsafeMutablePointer<NSDictionary?>) -> AnyObject! func runWithInput(_ input: AnyObject!, error error: NSErrorPointer) -> AnyObject! func runAsynchronouslyWithInput(_ input: AnyObject!) func willFinishRunning() func didFinishRunningWithError(_ errorInfo: [NSObject : AnyObject]!) func finishRunningWithError(_ error: NSError!) var output: AnyObject! func stop() func reset() func writeToDictionary(_ dictionary: NSMutableDictionary!) func opened() func activated() func closed() func updateParameters() func parametersUpdated() var stopped: Bool { get } } | OS X 10.10 |
To | class AMAction : NSObject { init?(definition dict: [String : AnyObject], fromArchive archived: Bool) init(contentsOfURL fileURL: NSURL) throws var name: String { get } var ignoresInput: Bool { get } var selectedInputType: String? var selectedOutputType: String? var progressValue: CGFloat func runWithInput(_ input: AnyObject?, fromAction anAction: AMAction?, error errorInfo: AutoreleasingUnsafeMutablePointer<NSDictionary?>) -> AnyObject? func runWithInput(_ input: AnyObject?) throws -> AnyObject func runAsynchronouslyWithInput(_ input: AnyObject?) func willFinishRunning() func didFinishRunningWithError(_ errorInfo: [String : AnyObject]?) func finishRunningWithError(_ error: NSError?) var output: AnyObject? func stop() func reset() func writeToDictionary(_ dictionary: NSMutableDictionary) func opened() func activated() func closed() func updateParameters() func parametersUpdated() var stopped: Bool { get } } | OS X 10.4 |
Declaration | |
---|---|
From | func finishRunningWithError(_ error: NSError!) |
To | func finishRunningWithError(_ error: NSError?) |
Declaration | |
---|---|
From | init!(contentsOfURL fileURL: NSURL!, error outError: NSErrorPointer) |
To | init(contentsOfURL fileURL: NSURL) throws |
Declaration | |
---|---|
From | init!(definition dict: [NSObject : AnyObject]!, fromArchive archived: Bool) |
To | init?(definition dict: [String : AnyObject], fromArchive archived: Bool) |
Modified AMAction.name
Declaration | |
---|---|
From | var name: String! { get } |
To | var name: String { get } |
Modified AMAction.output
Declaration | |
---|---|
From | var output: AnyObject! |
To | var output: AnyObject? |
Declaration | |
---|---|
From | func runAsynchronouslyWithInput(_ input: AnyObject!) |
To | func runAsynchronouslyWithInput(_ input: AnyObject?) |
Declaration | |
---|---|
From | func runWithInput(_ input: AnyObject!, error error: NSErrorPointer) -> AnyObject! |
To | func runWithInput(_ input: AnyObject?) throws -> AnyObject |
Modified AMAction.selectedInputType
Declaration | |
---|---|
From | var selectedInputType: String! |
To | var selectedInputType: String? |
Modified AMAction.selectedOutputType
Declaration | |
---|---|
From | var selectedOutputType: String! |
To | var selectedOutputType: String? |
Declaration | |
---|---|
From | func writeToDictionary(_ dictionary: NSMutableDictionary!) |
To | func writeToDictionary(_ dictionary: NSMutableDictionary) |
Modified AMAppleScriptAction
Declaration | Introduction | |
---|---|---|
From | class AMAppleScriptAction : AMBundleAction { var script: OSAScript! } | OS X 10.10 |
To | class AMAppleScriptAction : AMBundleAction { var script: OSAScript } | OS X 10.4 |
Modified AMAppleScriptAction.script
Declaration | |
---|---|
From | var script: OSAScript! |
To | var script: OSAScript |
Modified AMBundleAction
Declaration | Introduction | |
---|---|---|
From | class AMBundleAction : AMAction, NSCoding, NSCopying { init!(definition dict: [NSObject : AnyObject]!, fromArchive archived: Bool) func awakeFromBundle() var hasView: Bool { get } var view: NSView! { get } var bundle: NSBundle! { get } var parameters: NSMutableDictionary! } | OS X 10.10 |
To | class AMBundleAction : AMAction, NSCoding, NSCopying { func awakeFromBundle() var hasView: Bool { get } var view: NSView? { get } var bundle: NSBundle { get } var parameters: NSMutableDictionary? } | OS X 10.4 |
Modified AMBundleAction.bundle
Declaration | |
---|---|
From | var bundle: NSBundle! { get } |
To | var bundle: NSBundle { get } |
Modified AMBundleAction.parameters
Declaration | |
---|---|
From | var parameters: NSMutableDictionary! |
To | var parameters: NSMutableDictionary? |
Modified AMBundleAction.view
Declaration | |
---|---|
From | var view: NSView! { get } |
To | var view: NSView? { get } |
Modified AMLogLevel [enum]
Raw Value Type | |
---|---|
From | -- |
To | UInt |
Modified AMShellScriptAction
Declaration | Introduction | |
---|---|---|
From | class AMShellScriptAction : AMBundleAction { func remapLineEndings() -> Bool func inputFieldSeparator() -> String! func outputFieldSeparator() -> String! } | OS X 10.10 |
To | class AMShellScriptAction : AMBundleAction { var remapLineEndings: Bool { get } var inputFieldSeparator: String { get } var outputFieldSeparator: String { get } } | OS X 10.4 |
Modified AMWorkflow
Declaration | |
---|---|
From | class AMWorkflow : NSObject, NSCopying { class func runWorkflowAtURL(_ fileURL: NSURL!, withInput input: AnyObject!, error error: NSErrorPointer) -> AnyObject! init!(contentsOfURL fileURL: NSURL!, error outError: NSErrorPointer) func writeToURL(_ fileURL: NSURL!, error outError: NSErrorPointer) -> Bool func setValue(_ value: AnyObject!, forVariableWithName variableName: String!) -> Bool func valueForVariableWithName(_ variableName: String!) -> AnyObject! func addAction(_ action: AMAction!) func removeAction(_ action: AMAction!) func insertAction(_ action: AMAction!, atIndex index: Int) func moveActionAtIndex(_ startIndex: Int, toIndex endIndex: Int) @NSCopying var fileURL: NSURL! { get } var actions: [AnyObject]! { get } var input: AnyObject! var output: AnyObject! { get } } |
To | class AMWorkflow : NSObject, NSCopying { class func runWorkflowAtURL(_ fileURL: NSURL, withInput input: AnyObject?) throws -> AnyObject init() convenience init(contentsOfURL fileURL: NSURL) throws func writeToURL(_ fileURL: NSURL) throws func setValue(_ value: AnyObject?, forVariableWithName variableName: String) -> Bool func valueForVariableWithName(_ variableName: String) -> AnyObject func addAction(_ action: AMAction) func removeAction(_ action: AMAction) func insertAction(_ action: AMAction, atIndex index: Int) func moveActionAtIndex(_ startIndex: Int, toIndex endIndex: Int) @NSCopying var fileURL: NSURL? { get } var actions: [AMAction] { get } var input: AnyObject? var output: AnyObject? { get } } |
Modified AMWorkflow.actions
Declaration | |
---|---|
From | var actions: [AnyObject]! { get } |
To | var actions: [AMAction] { get } |
Modified AMWorkflow.addAction(_: AMAction)
Declaration | |
---|---|
From | func addAction(_ action: AMAction!) |
To | func addAction(_ action: AMAction) |
Modified AMWorkflow.fileURL
Declaration | |
---|---|
From | @NSCopying var fileURL: NSURL! { get } |
To | @NSCopying var fileURL: NSURL? { get } |
Declaration | |
---|---|
From | init!(contentsOfURL fileURL: NSURL!, error outError: NSErrorPointer) |
To | convenience init(contentsOfURL fileURL: NSURL) throws |
Modified AMWorkflow.input
Declaration | |
---|---|
From | var input: AnyObject! |
To | var input: AnyObject? |
Declaration | |
---|---|
From | func insertAction(_ action: AMAction!, atIndex index: Int) |
To | func insertAction(_ action: AMAction, atIndex index: Int) |
Modified AMWorkflow.output
Declaration | |
---|---|
From | var output: AnyObject! { get } |
To | var output: AnyObject? { get } |
Modified AMWorkflow.removeAction(_: AMAction)
Declaration | |
---|---|
From | func removeAction(_ action: AMAction!) |
To | func removeAction(_ action: AMAction) |
Declaration | |
---|---|
From | class func runWorkflowAtURL(_ fileURL: NSURL!, withInput input: AnyObject!, error error: NSErrorPointer) -> AnyObject! |
To | class func runWorkflowAtURL(_ fileURL: NSURL, withInput input: AnyObject?) throws -> AnyObject |
Declaration | |
---|---|
From | func setValue(_ value: AnyObject!, forVariableWithName variableName: String!) -> Bool |
To | func setValue(_ value: AnyObject?, forVariableWithName variableName: String) -> Bool |
Declaration | |
---|---|
From | func valueForVariableWithName(_ variableName: String!) -> AnyObject! |
To | func valueForVariableWithName(_ variableName: String) -> AnyObject |
Declaration | |
---|---|
From | func writeToURL(_ fileURL: NSURL!, error outError: NSErrorPointer) -> Bool |
To | func writeToURL(_ fileURL: NSURL) throws |
Modified AMWorkflowController
Declaration | |
---|---|
From | class AMWorkflowController : NSController { var workflow: AMWorkflow! var workflowView: AMWorkflowView! unowned(unsafe) var delegate: AnyObject! var canRun: Bool { get } var running: Bool { get } @IBAction func run(_ sender: AnyObject!) @IBAction func stop(_ sender: AnyObject!) var paused: Bool { get } @IBAction func pause(_ sender: AnyObject!) @IBAction func step(_ sender: AnyObject!) @IBAction func reset(_ sender: AnyObject!) } |
To | class AMWorkflowController : NSController { var workflow: AMWorkflow? var workflowView: AMWorkflowView? unowned(unsafe) var delegate: AnyObject? var canRun: Bool { get } var running: Bool { get } @IBAction func run(_ sender: AnyObject) @IBAction func stop(_ sender: AnyObject) var paused: Bool { get } @IBAction func pause(_ sender: AnyObject) @IBAction func step(_ sender: AnyObject) @IBAction func reset(_ sender: AnyObject) } |
Modified AMWorkflowController.delegate
Declaration | |
---|---|
From | unowned(unsafe) var delegate: AnyObject! |
To | unowned(unsafe) var delegate: AnyObject? |
Declaration | |
---|---|
From | @IBAction func pause(_ sender: AnyObject!) |
To | @IBAction func pause(_ sender: AnyObject) |
Declaration | |
---|---|
From | @IBAction func reset(_ sender: AnyObject!) |
To | @IBAction func reset(_ sender: AnyObject) |
Declaration | |
---|---|
From | @IBAction func run(_ sender: AnyObject!) |
To | @IBAction func run(_ sender: AnyObject) |
Declaration | |
---|---|
From | @IBAction func step(_ sender: AnyObject!) |
To | @IBAction func step(_ sender: AnyObject) |
Declaration | |
---|---|
From | @IBAction func stop(_ sender: AnyObject!) |
To | @IBAction func stop(_ sender: AnyObject) |
Modified AMWorkflowController.workflow
Declaration | |
---|---|
From | var workflow: AMWorkflow! |
To | var workflow: AMWorkflow? |
Modified AMWorkflowController.workflowView
Declaration | |
---|---|
From | var workflowView: AMWorkflowView! |
To | var workflowView: AMWorkflowView? |
Modified AMWorkflowView
Declaration | |
---|---|
From | class AMWorkflowView : NSView { var editable: Bool var workflowController: AMWorkflowController! } |
To | class AMWorkflowView : NSView { var editable: Bool var workflowController: AMWorkflowController? } |
Modified AMWorkflowView.workflowController
Declaration | |
---|---|
From | var workflowController: AMWorkflowController! |
To | var workflowController: AMWorkflowController? |
Declaration | |
---|---|
From | func workflowController(_ controller: AMWorkflowController!, didError error: NSError!) |
To | func workflowController(_ controller: AMWorkflowController, didError error: NSError) |
Declaration | |
---|---|
From | func workflowController(_ controller: AMWorkflowController!, didRunAction action: AMAction!) |
To | func workflowController(_ controller: AMWorkflowController, didRunAction action: AMAction) |
Declaration | |
---|---|
From | func workflowController(_ controller: AMWorkflowController!, willRunAction action: AMAction!) |
To | func workflowController(_ controller: AMWorkflowController, willRunAction action: AMAction) |
Declaration | |
---|---|
From | func workflowControllerDidRun(_ controller: AMWorkflowController!) |
To | func workflowControllerDidRun(_ controller: AMWorkflowController) |
Declaration | |
---|---|
From | func workflowControllerDidStop(_ controller: AMWorkflowController!) |
To | func workflowControllerDidStop(_ controller: AMWorkflowController) |
Declaration | |
---|---|
From | func workflowControllerWillRun(_ controller: AMWorkflowController!) |
To | func workflowControllerWillRun(_ controller: AMWorkflowController) |
Declaration | |
---|---|
From | func workflowControllerWillStop(_ controller: AMWorkflowController!) |
To | func workflowControllerWillStop(_ controller: AMWorkflowController) |