Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Code:
- (void)mouseDown:(NSEvent *)event
{
    NSPoint p = [event locationInWindow];
}
 
Code:
- (void)mouseDown:(NSEvent *)event
{
    NSPoint p = [event locationInWindow];
}

Thank you!
But I have another problem. The situation is like this: If I put mouseDown code in the NSView's subclass, it will be called. If I put it in the NSWindowController's subclass , it will not be called. Why?
NSView and NSWindowController are both the NSResponse's subclass, so they should both override super class 's method.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.