NSWindow initializer and screen

Christiaan Hofman <[email protected]> Mon, 26 Jul 2010 14:05:30 +0200
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
NSWindow essentially has two initializers, one of them having a screen parameter. I want to create a window to be displayed on a particular screen that may be different from the primary screen, and a contentRect relative to the real screen coordinates (i.e. relative to the lower-left corner of the primary screen, as defined in the Cocoa Drawing Guide). My question is whether the screen parameter in the second initializer does anything more than just shift the contentRect relative to that screen? In other words, is there any reason why I should use that initializer when I want to display my window on a particular (secondary) screen? Also, can someone definitely confirm that indeed the second initializer (with the screen parameter) interprets the contentRect relative to the lower-left point of the screen passed in as a parameter, rather than using true global screen coordinates? And does the designated initializer (without the screen parameter) interpret the contentRect always relative to the primary screen? (Please don't point me to the documentation of these initializers, because that's is confusing, misleading, contradictory, and incomplete; bug filed.)

Thanks, 
Christiaan