• 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: Simple loadNibNamed Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple loadNibNamed Question


  • Subject: Re: Simple loadNibNamed Question
  • From: Daniel Jalkut <email@hidden>
  • Date: Fri, 3 Feb 2006 21:42:32 -0500

Yes, you will get multiple instances. That's the beauty of the Nib! You often want to use it as a "starting point" for multiple objects (like documents, for instance).

How do you check if a nib is already loaded? Keep track of it yourself. If you think of Nibs as a file with information that tells Cocoa how to instantiate stuff, then it doesn't make sense to ask "is it loaded" any more than it makes sense to ask (for instance) "did I already read the contents of some file into memory once?" You have to be in charge of the objects you allocate and keep track of whether you want to allocate new ones or not.

Daniel

On Feb 3, 2006, at 10:47 AM, Koen Bok wrote:

If I call loadNibNamed:owner: for the same NIB more than one time in my application, will it load multiple instances of the nib into the memory? Or will it only load it if it is not loaded yet? If not, what is the way to check if a NIB is already loaded?

Koen _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Simple loadNibNamed Question (From: Koen Bok <email@hidden>)

  • Prev by Date: Can't create NSBitmapImageRep for CMYK planar data?
  • Next by Date: Re: Toolbar with unifier toolbar/title bug?
  • Previous by thread: Simple loadNibNamed Question
  • Next by thread: Custom NSView doesn't redraw itself properly after use of NSPopUpButton
  • Index(es):
    • Date
    • Thread