I have an application with two XIB files. One contains an NSWindow that is displayed when a certain menu item is clicked in the menu defined by the XIB file. This works. However, the new window doesn't have focus and none of the methods like makeKeyWindow etc. seem to change that fact when called. How do I change the focus to another window? Also, how can I make an NSWindow modal? Thanks in advance.