• 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
duplicating views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

duplicating views


  • Subject: duplicating views
  • From: Torsten Curdt <email@hidden>
  • Date: Fri, 13 Jun 2008 12:55:35 -0700

I have a NSView "template" in my nib that I am duplicating in a container view like this:

- (void) awakeFromNib
{
    NSView *view;

NSData *templateView = [NSArchiver archivedDataWithRootObject:myView];

    view = [NSUnarchiver unarchiveObjectWithData:templateView];
    [self addSubview:view];

    view = [NSUnarchiver unarchiveObjectWithData:templateView];
    [self addSubview:view];

Unfortunately (but to no big surprise) this does not set the IBOutlets.
Is there any other way but injecting the references myself?

cheers
--
Torsten
_______________________________________________

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: duplicating views
      • From: Jonathan Hess <email@hidden>
    • Re: duplicating views
      • From: Graham Cox <email@hidden>
    • Re: duplicating views
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Still trying to refactor a category as a class
  • Next by Date: How to mix Check boxes and Radio buttons in NSOutlineView?
  • Previous by thread: Re: Still trying to refactor a category as a class
  • Next by thread: Re: duplicating views
  • Index(es):
    • Date
    • Thread