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
2
votes
1 answer

beginSheet: block alternative?

Didn't Snow Leopard introduce some alternative to the old beginSheet: method that allows using a block to do the finishing stuff? I don't like having it in another callback method.
Enchilada
  • 3,859
  • 1
  • 36
  • 69
2
votes
1 answer

Cocoa: NSApp beginSheet sets the application delegate?

I am trying to display a custom sheet in my application, but I think I am doing something wrong. While everything seems to be working just fine, I have a rather odd side-effect. (which took hours to figure out). It turns out that everytime I display…
nrj
  • 1,701
  • 2
  • 22
  • 37
2
votes
2 answers

How to show an NSWindow as sheet at specific location

I have a window like this, having 3 subviews, each one of them has button. On click of those- I need to show sheet. By using this code, sheet comes in centre of the window. - (IBAction)closeSubWindow:(id)sender{ [NSApp…
Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140
1
vote
1 answer

cocoa beginSheet: didEndSelector throwing an error

I'm loading a sheet into my main .xib, the sheet is a panel and I have no problem displaying the sheet or closing it but when I close it I am getting an error message: 2012-02-21 11:10:12.142 CollectionTest2[23277:10b] *** - [AppController…
PruitIgoe
  • 6,166
  • 16
  • 70
  • 137
1
vote
1 answer

Custom modal dialog and background operations

I have a Cocoa app with a custom, multi-step account setup that I implemented as a custom modal dialog with a set of views. The problem is that the background operations (fetching a URL) seem to get stuck. I assume that this is because the…
Mark
  • 6,647
  • 1
  • 45
  • 88
1
vote
1 answer

NSApp beginSheet creates a sheet very briefly then disappears

[NSApp beginSheet] is used like so: [NSApp beginSheet:[testSheetController window] modalForWindow:[NSApp mainWindow] modalDelegate:nil didEndSelector:nil contextInfo:nil]; Upon execution the sheet appears for a split second,…
Jon
  • 1,379
  • 1
  • 12
  • 32
1
vote
3 answers

Better way to manage lifetime of instance created in class method

In a pet application I'm writing, on the main window, I have a few custom views aligned under each other, each with a label, a combobox and a button. Clicking the button invokes code that finds the combobox in the same view, and then calls the…
Rudy Velthuis
  • 28,387
  • 5
  • 46
  • 94
1
vote
1 answer

Can a view controller own a sheet?

I want to call a sheet from within a view controller (user clicks on a button and the sheet will be displayed). Can the sheet have a separate window controller (with outlets and actions) or does the view controller from which the sheet is called…
1
vote
2 answers

Am I using BeginSheet right? (MonoMac)

I have a feeling that I've either stumbled upon a bug (unlikely) or that I'm just using this function wrong (probably). I'm trying to make a sheet appear on my MainWindow. For some reason though, the sheet window pops up as a regular window without…
Robin Heggelund Hansen
  • 4,906
  • 6
  • 37
  • 54
1
vote
2 answers

Cocoa: Processing thread results, and queuing multiple sheets

I have a multithreaded application that has many concurrent operations going on at once. When each thread is finished it calls one of two methods on the main thread performSelectorOnMainThread:@selector(operationDidFinish:) //…
nrj
  • 1,701
  • 2
  • 22
  • 37
1
vote
1 answer

Asynchronous dispatch in a called method

I am trying to complete a long calculation with a determinate progress bar. This is working fine with the below code. However, in the method which calls scan, it immediately moves on to scoreWithEquation before scan has finished updating the…
abroekhof
  • 796
  • 1
  • 7
  • 20
1
vote
1 answer

Making a sheet from a panel in AppleScriptObjC

Alright, I'm trying to make a sheet appear in my AppleScriptObjC app, based on a panel I've already designed in the 'Interface Builder' .xib file. I've found a fantastic answer here, but it's for Objective-C, and I'm struggling to translate it into…
Ben
  • 305
  • 4
  • 13
1
vote
1 answer

can't call beginSheet after OK is pressed in NSSavePanel?

My cocoa program has a save feature, which when user selected the saving destination, I'll have to bring up another NSPanel, to display some sort of status (ie. how long it will take to finished saving the file. Here is my code: -…
Josh
  • 692
  • 2
  • 9
  • 38
1
vote
1 answer

NSPanel is always on top of all other app windows

My NSPanel window is always on top of all other apps windows. This is how I load it: [NSApp beginSheet:[self window] modalForWindow:[rootDocument mainWindow] modalDelegate:self didEndSelector:nil contextInfo:nil]; I've tried to change the level…
aneuryzm
  • 63,052
  • 100
  • 273
  • 488
1
vote
1 answer

how to get information from custom sheet in OSX

I have created a custom sheet which has a table in it. The table has list of usernames in it: I want to get the selected row value and use it in the application. I am able to get the row in the the following…
Nik
  • 2,913
  • 7
  • 40
  • 66