cocoa-sheet

Why isn't my sheet attached to the window it's run for?

时光毁灭记忆、已成空白 提交于 2019-12-03 01:17:41
I have a NIB which contains two windows, one is the app's main window visible at launch and the other is a custom sheet (and therefore not visible at launch). When the sheet is required my controller calls: [NSApp beginSheet: sheetWindow modalForWindow: mainWindow modalDelegate: self didEndSelector: @selector(didEndSheet:returnCode:contextInfo:) contextInfo: nil]; which displays the sheet window and starts a modal session, but the window has a standard Aqua title bar, is not 'connected' to the main window and can be moved around just like a regular window. Needless to say, this is not

Displaying a Cocoa Window as a Sheet in Xcode 4 (OSX 10.7.2) with ARC

蓝咒 提交于 2019-11-28 15:48:20
问题 I'm trying to get a Login Window to display as a sheet from my MainWindow, but whenever I try to implement the AppKit methods an error always pops up for various indistinguishable reasons. None of the online guides out there are working, when i apply their code / adapted classes to my own project they never work. Most of the guides are heavily outdated, including the Apple Documentation. And none of them seem to be compatible with Automatic Reference Counting. Or the Xcode 4 interfaces. Would

NSWindowController clarification of understanding

廉价感情. 提交于 2019-11-28 15:31:51
I have used NSWindowController in projects several times, and feel like I have a (very)rough grasp of the concepts behind this important class. What I would like to do with this post is to clarify/correct my own understandings, and hopefully help other learners get that first step into understanding. It's the at-a-glance concepts, overview, and best practices that I find is most useful, and often lacking in the documentation. Here is my take on NSWindowController (questions are interspersed in bold): An NSWindowController (NSWC) subclass exists (conceptually) just beneath every window nib,

NSWindowController clarification of understanding

时间秒杀一切 提交于 2019-11-27 09:16:00
问题 I have used NSWindowController in projects several times, and feel like I have a (very)rough grasp of the concepts behind this important class. What I would like to do with this post is to clarify/correct my own understandings, and hopefully help other learners get that first step into understanding. It's the at-a-glance concepts, overview, and best practices that I find is most useful, and often lacking in the documentation. Here is my take on NSWindowController (questions are interspersed