• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: dismissing sheets.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dismissing sheets.


  • Subject: Re: dismissing sheets.
  • From: j o a r <email@hidden>
  • Date: Fri, 7 Feb 2003 16:43:52 +0100

I have to reply to my own email - this type of mistakes simply won't do... ;)

On Friday, Feb 7, 2003, at 16:23 Europe/Stockholm, j o a r wrote:

- (void) sheetEnded: (NSWindow *)sheet returnCode: (int)returnCode context: (void *)contextInfo
{
[NSApp endSheet: sheet];
[sheet orderOut: self];
}

Should be replaced, corrected, and expanded, into something like this:

- (IBAction *) myButtonAction:(id) sender
{
// The user hit one of the buttons in the sheet
[self getRidOfTheSheet];
}

- (void) someMethod
{
// You decide to take down the sheet because of something not
// triggered by user events
[self getRidOfTheSheet];
}

- (void) getRidOfTheSheet
{
[NSApp endSheet: mySheet];
[mySheet orderOut: nil];
}

- (void) sheetEnded: (NSWindow *)sheet returnCode: (int)returnCode context: (void *)contextInfo
{
// Whatever needs to be done after the sheet is closed, perhaps release
// the contextInfo object for example.
}

j o a r
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: dismissing sheets. (From: j o a r <email@hidden>)

  • Prev by Date: Re: setting the insertion point in NSTextView
  • Next by Date: Re: Preferences, Authorization, Writing files
  • Previous by thread: Re: dismissing sheets.
  • Next by thread: setting the insertion point in NSTextView
  • Index(es):
    • Date
    • Thread