• 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: [noob] Best practice for creating multiple instances of a View
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [noob] Best practice for creating multiple instances of a View


  • Subject: Re: [noob] Best practice for creating multiple instances of a View
  • From: Stuart Malin <email@hidden>
  • Date: Fri, 20 Mar 2009 08:53:59 -1000


On Mar 20, 2009, at 8:38 AM, I. Savant wrote:

On Fri, Mar 20, 2009 at 2:19 PM, Stuart Malin <email@hidden> wrote:
I have a Nib file containing a single NSView that contains several controls.
I need to make numerous copies of this view (which are placed as subviews of
some containing view). Presently, I load the Nib for each occurrence needed.
But I now wonder if this is the best approach (going back to the Nib file
and loading each time).

This is "the usual way" in Cocoa. If you're having performance issues, profile the code and address them specifically, but you're on the right track as far as the way it's normally done.

Thanks for the quick reply and the assurance. No performance issues -- just had been wondering about the effect of going back to disk every time I need one of these views (which will be frequent and there will be many). Perhaps the fact of disk caching makes this a non issue.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: [noob] Best practice for creating multiple instances of a View
      • From: "I. Savant" <email@hidden>
    • Re: [noob] Best practice for creating multiple instances of a View
      • From: Kyle Sluder <email@hidden>
References: 
 >[noob] Best practice for creating multiple instances of a View (From: Stuart Malin <email@hidden>)
 >Re: [noob] Best practice for creating multiple instances of a View (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: need advice on subclassing NSScrollVIew
  • Next by Date: Re: NSData confusion
  • Previous by thread: Re: [noob] Best practice for creating multiple instances of a View
  • Next by thread: Re: [noob] Best practice for creating multiple instances of a View
  • Index(es):
    • Date
    • Thread