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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to