• 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: Sheets in a doc-based application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sheets in a doc-based application


  • Subject: Re: Sheets in a doc-based application
  • From: Brian Webster <email@hidden>
  • Date: Mon, 18 Feb 2002 16:34:55 -0600

On Monday, February 18, 2002, at 03:30 PM, cocoa-dev-
email@hidden wrote:

to begin the sheet. Unfortunately, because vertexSheet
is already instantiated in a .nib, I guess I can't use
the same sheet for two different windows at the same
time. Is there any way to get around this? How would I
make a copy of an NSPanel instance in my nib file? If
I did, could I the same sheet to different windows at
the same time?

Since each document needs a separate copy of the sheet, you should either a) put the sheet window in your document's nib file and hook it up to an outlet in the document/window controller (depending on how your document's set up), or b) put the sheet in its own separate nib and load it if needed using NSBundle's loadNibNamed:owner: method. Option (a) is a bit simpler, but will sometimes use more memory, since (b) lets you wait until you actually need to use the sheet in a document befor you load it into memory. You can copy and paste the panel from one nib file to another in Interface Builder.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.

  • Prev by Date: Re: NSAutoReleasePool
  • Next by Date: Re: Tiff with mask
  • Previous by thread: Transparency.
  • Next by thread: Height of a string with fixed width and given font
  • Index(es):
    • Date
    • Thread