Questions tagged [cocoa-sheet]

A window in OS X that slides down from the top of its parent window.

One of the feature for OSX that creates a window that slides from top to the parent window..called as Sheet.

This is modal to the window.

This is used as:

- (IBAction)showSheet:(id)sender {
    [NSApp beginSheet:self.sheetWindow
       modalForWindow:self.window
        modalDelegate:self
       didEndSelector:nil
          contextInfo:nil];
}

- (IBAction)closeSheet:(id)sender{
    [NSApp endSheet:self.sheetWindow];
    [self.sheetWindow orderOut:nil];

}
50 questions
53
votes
5 answers

OS X - How can a NSViewController find its window?

I have a Document based core data app. The main document window has a number of views, each controlled by its own custom NSViewController which are switched in as necessary. I want each of these view controllers to be able to drop down a custom…
AJ.
  • 1,226
  • 1
  • 16
  • 21
42
votes
2 answers

NSWindowController clarification of understanding

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…
Loz
  • 2,198
  • 2
  • 21
  • 22
35
votes
2 answers

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

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…
26
votes
2 answers

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

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…
user23743
9
votes
1 answer

How to show sheet from separate NIB

How do I put a window in a separate NIB, give it its own NSWindowController, make it slide out as a sheet? (Is this a typical thing to do with sheets?) I am trying to show a custom sheet (a window that slides down from the title bar of the parent…
stifin
  • 1,390
  • 3
  • 18
  • 28
8
votes
1 answer

Check if a sheet is open

I'm writing a Cocoa app and basically I have a window and I need to check if a sheet is open before I open another window. Google doesn't seem to know that one. How may I check if the sheet is open or not?
Fernando Valente
  • 1,096
  • 1
  • 8
  • 30
7
votes
3 answers

How to show a NSPanel as a sheet

I'm trying to show a NSPanel as a sheet. I'm naively doing something along those lines: SheetController *sheetController = [[[SheetController alloc] initWithWindowNibName:@"Sheet"]…
Martin Cote
  • 28,864
  • 15
  • 75
  • 99
6
votes
1 answer

beginSheet: block alternative with ARC?

Mike Ash created an example of using blocks to handle callbacks from sheets, which seems very nice. This was in turn updated to work with garbage collection by user Enchilada in another SO question at beginSheet: block alternative?, see…
6
votes
2 answers

beginSheet method not working for me

I have saveWindowController (NSWindowController subclass object). I use initWithWindowNibName: method to init the controller. I set File's owner in xib to SaveWindowController. I connect delegate (from window) to File's owner and window (from…
Lloyd18
  • 1,679
  • 1
  • 18
  • 28
5
votes
2 answers

Cocoa: Displaying an error after NSApp beginSheet results the main window hiding

I have broken this down into a very small project. Using the following code in the application delegate: - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { TestingWindowController * testingWindowController =…
Kyle
  • 17,317
  • 32
  • 140
  • 246
4
votes
2 answers

Trouble using custom modal sheet with Cocoa

My objective: Display a custom sheet with a determinate NSProgressIndicator while the app works through a lengthy loop. I want the sheet to be application-modal, not document-modal. The user cannot dismiss the modal sheet. They must wait for the…
David Nix
  • 3,324
  • 3
  • 32
  • 51
3
votes
2 answers

Working with multiple Windows Using Interface Builder

How to work with multiple windows in Cocoa? I have created a cocoa application. When I run that application it automatically shows a default window. I've added a button in the window. When I click the button I want to open another window named…
EmptyStack
  • 51,274
  • 23
  • 147
  • 178
3
votes
3 answers

How can I remove the "blur" effect that Cocoa adds to transparent sheets?

By default, Cocoa adds a background blur effect to transparent and semitransparent modal sheets when they are applied to a window. I would like to disable the blur effect. How would I go about doing it? I have created a custom sheet (a subclass of…
e.James
  • 116,942
  • 41
  • 177
  • 214
3
votes
0 answers

Get UINavigationController-like behavior in a Mac application

I'm very new for mac application. Previously I've worked only for iPhone application and now I've started to learn mac application. I've created a simple application, for every application we have default toolbar at the top of the screen. So on…
Exploring
  • 925
  • 6
  • 18
2
votes
1 answer

NSTimer in sheet window not firing

I have a timer within a panel that I am trying to get to fire every second, however I cannot seem to get it to fire. I am creating my panel like so: // Begin our sheet [NSApp beginSheet: targetController.window modalForWindow: self.window …
Kyle
  • 17,317
  • 32
  • 140
  • 246
1
2 3 4