문제

As far as I know, sheets modal for a certain window without "freezing" the app can only be NSSavePanels, NSOpenPanels, and NSAlerts windows (since NSAlert isn't a NSWindow or NSPanel subclass but it has an associated window); if I wanted a generic NSPanel to be such a sheet, for example, I couldn't prevent it from freezing the app since the only (?) way to start that sheet is using

[NSApp beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:]

So, is there any way to set a generic panel as a sheet without freezing the entire app?

도움이 되었습니까?

해결책

-[beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:] for you with an NSPanel without difficulty.

However, if you have multiple windows on the same document, NSApp will block all windows within that document, since it's actually Document modal, not Window modal.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top