Re: determining front most document?
Re: determining front most document?
- Subject: Re: determining front most document?
- From: Ashley Clark <email@hidden>
- Date: Tue, 26 Apr 2005 09:25:55 -0500
Why not use [NSApp orderedDocuments]?
According to Apple's website:
Returns a zero-based array of document objects, where the position
of a document in the array is based on the front-to-back ordering
of its associated window.
On Apr 26, 2005, at 1:29 AM, Mark Dawson wrote:
When I bring my preferences window forward, it puts my document
behind (as expected). However, I want my pref window to access the
"current" document, which I guess is defined as the top most window
that has a document associated with it. [[NSDocumentController
sharedDocumentController] currentDocument] doesn't work because it
returns the document associated with the main window, which is my
preference window (so returns nil).
I didn't see any way to go through the window list to determine
this. It looks like NSApplication has a "-windows" call that
returns an array of windows, but it didn't say that it was ordered
in any way. I see that I can change a window order (-orderBack, -
level, etc) of a particular window, but not how to figure out what
window is "below" any particular oneā¦
Thanks!
mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden