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/archive%40mail-archive.com This email sent to arch...@mail-archive.com