---
title: performDefaultImplementation()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/nsscriptcommand/performdefaultimplementation()
---

# performDefaultImplementation()

Overridden by subclasses to provide a default implementation for the command represented by the receiver.

## Declaration

```swift
func performDefaultImplementation() -> Any?
```

## Discussion

Discussion Do not invoke this method directly. execute() invokes this method when the command being executed is not supported by the class of the objects receiving the command. The default implementation returns nil. You need to create a subclass of NSScriptCommand only if you need to provide a default implementation of a command.

## See Also

### Executing the command

- [execute()](foundation/nsscriptcommand/execute().md)
