English 中文(简体)
何时创立了国家女权联盟。
原标题:When is the NSApp s keyWindow created?

key子何时创造?

我认为,在要求采用相应的观察控制员更新意见方法(Which I呼应觉醒觉From Nib)之前,将设立NSWindow,然而,如果我使用NSApp的主寡妇制作警报表,这似乎并不正确。

然而,如果我把一个子子放在这个观点上,然后当用户点击时发出警报,则界定了主要的Window,并正确显示(如预期的那样)。

我的申请代表几乎是空洞的。

我实际上不想在启动时显示警惕,但我确实想知道关键窗口何时建立。

最佳回答

key子何时创造?

-[NSApp keyWindow]> 系指目前主要窗口的现有窗口(例如,已经从刀子中填满的窗口),通常是通过发送-makeKeyAndORFront:

When an application starts, Cocoa:

  1. Loads the main nib file;
  2. Unarchives the contents of the nib file and instantiates its objects;
  3. Reestablishes the connections defined in the nib file;
  4. Sends -awakeFromNib to (a subset of) the nib file objects;
  5. Displays windows that have been marked as Visible at launch time;

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/LoadingResources/Introduction/Introduction.html 《资源规划指南》。

如果尼伯案包含一个单一窗口,如果窗户能够成为关键窗口,则该窗户就会变得关键,而发送到<>><>>>>>>>><-awakeFrom Nib。

另外,。 指出:

如果申请方的nib档案尚未完成装货,或者接收人不积极,则该方法可退回<代码>nil。

问题回答

暂无回答




相关问题
Taking picture with QTCaptureView

Is it possible to simply take a picture and save it somewhere using a QTCaptureView and Apple s built-in iSight? I ve seen lots of tutorials on recording video but none on simply taking a picture. Any ...

Controlling OSX windows

I m trying to control windows of a foreign OSX applications from my application. I d like to 1. move the windows on the screen 2. resize the windows on the screen 3. change the currently active window ...

objective-c: Calling a void function from another controller

i have a void, like -(void) doSomething in a specific controller. i can call it in this controller via [self doSomething], but i don t know how to call this void from another .m file. I want to call ...

NSUndoManager and runModalForWindow:

I have a simple Core Data app which displays a list of entities in the main window. To create or add new entities, I use a second modal window with a separate managed object context so changes can be ...

NSMutableArray values becoming "invalid"

I m trying to show a database information in a tableview and then the detailed information in a view my problem is as follow: I created a NSMutableArray: NSMutableArray *myArray = [[NSMutableArray ...

How to get a flash url in a webpage using a webframe?

As we know , When we load frame from webpage of safari, we will invoke the delegate methods of webkit informal protocol(WebFrameLoadDelegate): webView:didStartProvisionalLoadForFrame: webView:...

热门标签