Implementing AppleScript Recordability
The
ASObjfunction creates anASObjectproxy object for any NSObject that implementsobjectSpecifier.invokeCommandtakes care of marshalling the parameters into an AppleEvent, sending it, and unmarshalling the return value into an NSObject. The name of the command is the name of the name used in AppleScript, not the Cocoa implementation.
Then his controllers use the proxy objects to talk to the model through AppleScript.