• 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: Custom Sheets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Sheets


  • Subject: Re: Custom Sheets
  • From: John Lombardo <email@hidden>
  • Date: Wed, 30 Jul 2003 02:04:06 +0800

For some wholesome sheety goodness, check out Mike Beam's tutorial:

http://www.macdevcenter.com/pub/a/mac/2001/10/05/cocoa.html

There's a lot to learn at macdevcenter.com

Cheers,
john

On 30/7/03 1:34 AM, "Seth Willits" <email@hidden> wrote:

> What are the steps to creating a custom sheet? When a button is clicked
> I want to display a custom modal sheet where a user can enter some data
> into a text field, but I can't figure out how make a sheet in Interface
> Builder. I created an NSWindow instance attempted to use that with the
> code below, but it says that the window needs to be modal. I'm looking
> around in the documentation and can't find anything (obviously I'm
> missing it) and there aren't any examples I can find.
>
>
>
> - (void)showCustomSheet: (NSWindow *)parentWindow
> {
> [NSApp beginSheet: sheetWindow
> modalForWindow: parentWindow
> modalDelegate: nil
> didEndSelector: nil
> contextInfo: nil];
> [NSApp runModalForWindow: sheetWindow];
> // Sheet is up here.
> [NSApp endSheet: sheetWindow];
> [sheetWindow orderOut: self];
> }
>
>
> Also, I assume I should be using a custom NSWindowController to display
> and handle the sheet when it's closed. Is this correct, or is there
> another way? (I'm new to Cocoa)
> Right now, my button calls a function in a controller class which then
> tells the sheet's window controller that the sheet should display and
> return a value.
>
>
> Seth Willits
> ------------------------------------------------------------------------
> ---
> President and Head Developer of Freak Software - http://www.freaksw.com
> Q&A Columnist for REALbasic Developer Magazine -
> http://www.rbdeveloper.com
> Webmaster for REALbasic Game Central - http://www.freaksw.com/rbgames
>
> "Life without love is like a tree without blossoms or fruit."
> -- Kahlil Gibran
> ------------------------------------------------------------------------
> ---
> _______________________________________________
> 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.
_______________________________________________
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: 
 >Custom Sheets (From: Seth Willits <email@hidden>)

  • Prev by Date: NSTask vs. BSD API (was: Talking to the Dock)
  • Next by Date: ScreenSaverEngine and screen saver defaults
  • Previous by thread: Custom Sheets
  • Next by thread: Re: Custom Sheets
  • Index(es):
    • Date
    • Thread