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
1
vote
1 answer

Sheets are not displaying properly on OSX

I am very much new to OSX development. Consider this as my first app. I want to display a sheet when a button is clicked on the main window. I am using Nib Following is my code for .h file #import #import…
Nik
  • 2,913
  • 7
  • 40
  • 66
1
vote
1 answer

Show NSWindow as a toolbar sheet

How do you show a NSWindow from the toolbar, like the NSOpenPanel in the picture below?
hpique
  • 119,096
  • 131
  • 338
  • 476
1
vote
1 answer

Can't change Text Label on Sheet

I've created a sheet which I would like to display various messages while the program is doing data crunching. The sheet opens and closes correctly and I have a Text Label on the sheet which is connected to my main controller (the owner of the…
Greg Steiner
  • 647
  • 1
  • 9
  • 20
1
vote
1 answer

Prevent custom sheet from snatching focus

I'm writing a multi-document application using Cocoa. The user must enter a password when opening a document. After a certain amount of time without activities on a document the user is once again required to enter the password. Right now I'm using…
ims
  • 66
  • 6
0
votes
1 answer

Sheet opening unattached to window

I have a problem with a sheet that when opened for the first time, will open unattached to the window. After dismissing it, then the sheet works as it should. Here is the code that I am starting the sheet with: -…
doodle
  • 47
  • 7
0
votes
2 answers

How do I use the return value of a sheet to decide whether or not to close a window?

I want to use windowShouldClose: in my NSWindowController subclass to pop up a sheet asking if the user wants to save changes before closing with Save, Cancel, and Don't Save buttons. The issue I'm running in to is that beginSheetModalForWindow:...…
Redwood
  • 66,744
  • 41
  • 126
  • 187
0
votes
2 answers

cocoa get sheet state

Is there a way to determine the state of a sheet? I know I can call this method: - (void) customSheetDidClose : (NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo but what I want to do is something like this: -…
PruitIgoe
  • 6,166
  • 16
  • 70
  • 137
0
votes
2 answers

How to disable the Quit func under the mutilDocument environment?

I haove a mutilDocument App , I found that when I open a window with the method : [NSApp beginSheet: [MultiWin window] modalForWindow: mainWindows modalDelegate: nil didEndSelector: nil contextInfo: nil]; The Quit func in mainmeny already…
jin
  • 2,145
  • 5
  • 27
  • 44
0
votes
2 answers

How to show a view in this way on Cocoa Desktop?

I'm doing an app and I was wondering how can you show a view like this:
pmerino
  • 5,900
  • 11
  • 57
  • 76
0
votes
2 answers

ok button for alert in mac app does not work

On a button click, I am using the below code testViewController *myWindowController = [[testViewController alloc] initWithWindowNibName:@"RecordingsViewController"]; [myWindowController setDelegate:self]; activeModalWindow = [myWindowController…
Swastik
  • 2,415
  • 2
  • 31
  • 61
0
votes
1 answer

How to consume 'edit' event for NSTableView

Inside a NStableViewDelegate, I use a sheet window to begin a edit operation like this: - (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { editEntity = [[contractsAC…
SteAp
  • 11,853
  • 10
  • 53
  • 88
0
votes
3 answers

Modal Window in Cocoa

I'm trying to create a custom modal window and here is the code I have so far: NSWindowController *modalSheet = [[NSWindowController alloc] initWithWindowNibName:@"MyCustomWindow" owner:self]; [NSApp beginSheet:[modalSheet window] …
jdelaune
  • 161
  • 1
  • 2
  • 12
0
votes
1 answer

Usable mainmenu when sheet is shown

How does one react to menuitems that are clicked via mouse or invoked via keyboard, e.g: CMD+Q ? [NSApp beginSheet:my_sheet ...arguments... ]; /* The sheet is now shown and the mainmenu isn't usable. How does one make it usable? */ [NSApp…
neoneye
  • 50,398
  • 25
  • 166
  • 151
0
votes
1 answer

Sheet and thread memory problem

recently I started a project which can export some precalculated Grafix/Audio to files, for after processing. All I was doing is to put a new Window (with progressindicator and an Abort Button) in my main xib and opened it using the following…
Xident
  • 1
0
votes
1 answer

How to prevent mouse event when a sheet display?

I found that the NSView's rightMouseUp could still be active when a sheet display.I used this code. [NSApp beginSheet:editPanel modalForWindow:window modalDelegate:self didEndSelector:@selector(didEndSheet:returnCode:contextInfo:) …
gohamgx
  • 273
  • 2
  • 16