NSOpenPanel在Yosemite上生成控制台警告

时间:2015-03-14 17:12:28

标签: objective-c osx-yosemite nsopenpanel

我有以下方法:

- (IBAction) selectPatientDirectory: (id)sender {
    NSOpenPanel *panel = [NSOpenPanel openPanel];

    panel.canChooseFiles          = NO;
    panel.canChooseDirectories    = YES;
    panel.allowsMultipleSelection = NO;

    [panel beginWithCompletionHandler: ^(NSInteger result) {
        if (result == NSFileHandlingPanelOKButton) {

            ALBuild *patient = [ALBuild new];
            [patient buildFrom: panel.URLs [0]];

        }
    }];
}

这种方法适用于小牛队(以及更低级别)。但是,当它在Yosemite上运行并且patient buildFrom:方法执行时间超过大约15秒时,我在控制台上收到以下警告:

<Warning>: void CGSUpdateManager::log() const: conn 0x17cb7 token 0x91fffffffff93ed
<Warning>: Backtrace (at 53861):
<Warning>: void CGSUpdateManager::log() const:  0   CoreGraphics                        0x00007fff8e9fc588 CGSBacktraceCreate + 112
<Warning>: void CGSUpdateManager::log() const:  1   CoreGraphics                        0x00007fff8ea1a940 _ZN16CGSUpdateManager14disable_updateEv + 86
<Warning>: void CGSUpdateManager::log() const:  2   AppKit                              0x00007fff84062b6b -[NSSavePanel ok:] + 300
<Warning>: void CGSUpdateManager::log() const:  3   libsystem_trace.dylib               0x00007fff900aecd7 _os_activity_initiate + 75
<Warning>: void CGSUpdateManager::log() const:  4   AppKit                              0x00007fff83c7cb71 -[NSApplication sendAction:to:from:] + 452
<Warning>: void CGSUpdateManager::log() const:  5   AppKit                              0x00007fff83c7c970 -[NSControl sendAction:to:] + 86
<Warning>: void CGSUpdateManager::log() const:  6   AppKit                              0x00007fff83e5286c __26-[NSCell _sendActionFrom:]_block_invoke + 131
<Warning>: void CGSUpdateManager::log() const:  7   libsystem_trace.dylib               0x00007fff900aecd7 _os_activity_initiate + 75
<Warning>: void CGSUpdateManager::log() const:  8   AppKit                              0x00007fff83cc5509 -[NSCell _sendActionFrom:] + 144
<Warning>: void CGSUpdateManager::log() const:  9   libsystem_trace.dylib               0x00007fff900aecd7 _os_activity_initiate + 75
<Warning>: void CGSUpdateManager::log() const:  10  AppKit                              0x00007fff83ce0085 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2775
<Warning>: void CGSUpdateManager::log() const:  11  AppKit                              0x00007fff83cdf2b9 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 491
<Warning>: void CGSUpdateManager::log() const:  12  AppKit                              0x00007fff83cde899 -[NSControl mouseDown:] + 714
<Warning>: void CGSUpdateManager::log() const:  13  AppKit                              0x00007fff841dca18 -[NSWindow _reallySendEvent:] + 12721
<Warning>: void CGSUpdateManager::log() const:  14  AppKit                              0x00007fff83c6316e -[NSWindow sendEvent:] + 446
<Warning>: void CGSUpdateManager::log() const:  15  AppKit                              0x00007fff83c15451 -[NSApplication sendEvent:] + 4183
<Warning>: void CGSUpdateManager::log() const:  16  AppKit                              0x00007fff83aa1608 -[NSApplication run] + 711
<Warning>: void CGSUpdateManager::log() const:  17  AppKit                              0x00007fff83a8ca14 NSApplicationMain + 1832
<Warning>: void CGSUpdateManager::log() const:  18  AutoLuke                            0x0000000100000ea2 main + 34
<Warning>: void CGSUpdateManager::log() const:  19  libdyld.dylib                       0x00007fff81c2d5c9 start + 1
<Warning>: void CGSUpdateManager::log() const:  20  ???                                 0x0000000000000003 0x0 + 3

我完全不知道为什么会这样。如果patient buildFrom:快速运行,则不会生成警告。优胜美地有新的超时问题吗?任何有关此问题的帮助将不胜感激。我正在使用:

Xcode: 6.2
OS X:  10.10.2

周围的工作:

如果您以模态方式运行面板,则不会收到警告:

- (IBAction) selectPatientDirectory: (id)sender {

    NSOpenPanel *panel = [NSOpenPanel openPanel];

    panel.canChooseFiles          = NO;
    panel.canChooseDirectories    = YES;
    panel.allowsMultipleSelection = NO;

    if ([panel runModal] == NSFileHandlingPanelOKButton) {
        ALBuild *patient = [ALBuild new];
        [patient buildFrom: panel.URLs [0]];
    }
}

0 个答案:

没有答案