• 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
Using an IB-built view multiple times
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using an IB-built view multiple times


  • Subject: Using an IB-built view multiple times
  • From: Christopher Drum <email@hidden>
  • Date: Tue, 20 Sep 2005 09:08:01 -0700

Hi all,

Working on a project that uses an NSView that contains multiple subviews. If I build a view in IB and link it to my AppController, I don't have any problems cramming that IB-designed view into my main view... and in fact that works quite nicely for my purposes thus far.

The problem I'm running into is that I want to be able to set up a sort of "template" view that I can insert into a primary view repeatedly. The idea is that the template would show information related to one instance of a class, then I'd reuse that template to show information related to another instance of that same class. Typically I would use an NSTableView to show the information, but the formatting and user needs are such that the TableView is too limiting.

It seems that this is possible if I create the entire template view programatically, then instantiate one anytime I need it. However, I was hoping there was some kind of procedure that would allow me to build the template graphically, then clone out instances of that view as needed. NSView doesn't seem to adhere to <NSCopying> protocol. So, I'm getting myself a little lost here. Is it even possible to subclass NSView to adhere to <NSCopying>?

Thanks in advance for any insight anyone can offer on this. I don't really need a lot of code samples (unless this problem requires non- Cocoa implementation!), just a general plan of attack or way of thinking about the problem.

Christopher Drum
http://homepage.mac.com/christopherdrum
_______________________________________________
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


  • Follow-Ups:
    • Re: Using an IB-built view multiple times
      • From: Ricky Sharp <email@hidden>
    • Re: Using an IB-built view multiple times
      • From: Michel Schinz <email@hidden>
  • Prev by Date: debugging Cocoa bundles from carbon app?
  • Next by Date: Re: Work with zerolink enabled; crashes due to signal 5 (SIGTRAP) without
  • Previous by thread: Re: debugging Cocoa bundles from carbon app?
  • Next by thread: Re: Using an IB-built view multiple times
  • Index(es):
    • Date
    • Thread