objective c - Get associated NSDocument for window

How do I properly retrieve the NSDocument associated with the document window? I need the NSDocument as data source for displaying data in the window.

Do I have to iterate over all open documents and check if my instance is equal to the document's -windowForSheet or is there a more suitable option?

1 Answer

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>