thanks for the reply!  yes i asked because according to my testing using 
activateIgnoringOtherApps does not show a window that is not visible.  it will 
definitely bring to the front a window that is already visible.  and in this 
case i am not using makeKeyAndOrderFront which i know will also show a window.  
i have not used makeMainWindow and though it is not a "document-based" app by 
design i do have it setup where clicking the dock icon will show my "main" 
window by sending a message to that window.  but i believe that's unrelated 
correct me if i'm wrong.

according to some reports at the stage i'm calling activateIgnoringOtherApps 
the "main" window is being shown although previously hidden, and the dock icon 
is not being clicked.  the reports seem reliable but i cannot reproduce it 
myself no matter what i do.  so i was looking for some input.  thank you very 
much for your time,

rick





________________________________
From: Quincey Morris <quinceymor...@earthlink.net>
To: cocoa-dev <cocoa-dev@lists.apple.com>
Sent: Tue, March 9, 2010 1:35:56 AM
Subject: Re: NSApp question

On Mar 8, 2010, at 03:03, Rick C. wrote:

> i have a question regarding this line:
> 
> [NSApp activateIgnoringOtherApps:YES];
> 
> now i know this will activate the app, but for example if the main window of 
> the app is closed should it cause the window to show?  i think it would not, 
> but it seems some people claim that it does.  as a note, this is used without 
> sending a makeKeyAndOrderFront to the main window.  thank you for your input,

It seems like the easiest way to find out would be to try it.

The trouble with following random claims by "some people" is that they're as 
likely to be wrong as to be right. Or they may be talking about something else. 
In a *document-based* app, activating the app when there are no document 
windows open will (by default) cause a new untitled document window to be 
opened.

However, you seem to talking about a non-document-based app. In that case, the 
behavior seems unlikely, if for no other reason than there's no formal concept 
of "the main window" -- in the sense of a primary window. (Presumably you don't 
mean in the isMainWindow sense, since closed windows can't be main windows in 
the isMainWindow sense.) So, the frameworks would have no basis on which to 
choose which closed window to show.


_______________________________________________

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/jo_phls%40yahoo.com

This email sent to jo_p...@yahoo.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