Finding front most window of a document
Finding front most window of a document
- Subject: Finding front most window of a document
- From: John Nairn <email@hidden>
- Date: Tue, 23 Dec 2008 10:55:51 -0800
I can't figure out how to determine the front most window of a
document when the neither the document nor the application may be
active. The application is when contacting an application from an
Apple script. Here is what I tried:
[NSApplication keyWindow] and mainWindow become null when application
or document are not main
[NSApplication windows] has list of all windows, but appears to be
arbitrary order (or at least switching order of two windows does not
change order in the windows array returned by NSApplication). Thus it
cannot be used to find which window for a document is first.
I looked for some ordered list of windows but couldn't find it
(although Apple Script "windows" property of an application does have
them in order)
I looked for way to compare two windows to see which is in front of
the other, but could not find one.
---------------
John Nairn
GEDitCOM - Genealogy Software for the Macintosh
http://www.geditcom.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden