Skip navigation.
 
mlBest way to get the window of an NSDocument?
FROM : Marc Respass
DATE : Sun Apr 24 19:59:32 2005

Hi,

NSDocument doesn't have a -window method to get the window for my
document. I believe it's possible to have multiple windows for a single
document but in this case, I'm putting a toolbar on my window during
-windowControllerDidLoadNib: so the document isn't even finished
opening yet. I'm using this

id myWindow = [self windowForSheet];

which according to the docs, seems to be a good way to go about it. I
just want to check on that. Is it a hack? Should I go through the
process of asking the window controller for the right window?

Thanks a lot
Marc

Related mailsAuthorDate
mlBest way to get the window of an NSDocument? Marc Respass Apr 24, 19:59
mlRe: Best way to get the window of an NSDocument? Daniel Eggert Apr 28, 10:28
mlRe: Best way to get the window of an NSDocument? Marc Respass Apr 28, 21:15
mlRe: Best way to get the window of an NSDocument? mmalcolm crawford Apr 30, 02:08
mlRe: Best way to get the window of an NSDocument? Marc Respass Apr 30, 16:40