Just check what action the Open menu item is connected to in Interface Builder. If I remember correctly, it would be connected to the "First Responder" object and the method open:
. Is that right?
In this case, just implement the open:
method in your AppDelegate class. (To understand why the method goes to the delegate, read about "nil-targeted actions" in Hillegass' book, or here: http://www.cocoadev.com/index.pl?NilTargetedAction. The thing to remember is that a control connected to "First Responder" in IB is actually IB's way of denoting that the target is nil.)
Note that you will have to implement the open panel yourself using NSOpenPanel -- see some code for example here: NSOpenPanel setAllowedFileTypes
If this is the same thing as that you're doing in openFile:withApplication:
, you will probably want to create a common private method and call that method from both openFile:withApplication:
and open:
.