• 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: Copying an NSView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copying an NSView?


  • Subject: Re: Copying an NSView?
  • From: Charles Bennett <email@hidden>
  • Date: Sat, 26 Jan 2002 16:35:27 -0500

http://www.powerguardian.com/osx/ pick up ExampleMDI.tar.gz for an
(very) simple example with comments..

chuck

Tom Dale wrote:
>
> Thanks for the help. I separated the NSView from the MainMenu nib and I
> have it in a separate nib.
>
> Now my problem is accessing the class.
>
> I used [NSBundle loadNibNamed:@"nibName" owner:self ]; but after that
> I'm not sure how to access the classes in it. Having looked through the
> documentation and the examples I haven't found an answer. NSBundle's
> classNamed: method looked promising, but it also didn't work. I am now
> very confused as to how I can access the elements that are created when
> loading a nib file.
>
> Thanks for any help.
>
> On Friday, January 25, 2002, at 04:01 PM, Ondra Cada wrote:
>
> > tomdale,
> >
> >>>>>>> email@hidden (t) wrote at Fri, 25 Jan 2002 15:49:05 -0800:
> > t> What I want to do is
> > t> create a new instance of my custom NSView and set that copy to the
> > view
> > t> of the newly created NSTabViewItem. The problem is that NSView
> > doesn't
> > t> conform to NSCopying, so I'm at a bit of a loss as to what to do.
> >
> > Well, this should be in FAQ, I guess -- particularly since for a newbie
> > the
> > correct answer is not intuitive the slightlest bit.
> >
> > Well, it's surprisingly simple: store the view(s) you need into a NIB,
> > and
> > load this NIB whenever you want a copy of the view. That's all, with a
> > BIG
> > added benefit of you being able to set up those views in
> > InterfaceBuilder
> > instead of the programmatical legwork.
> > ---
> > Ondra Cada
> > OCSoftware: email@hidden http://www.ocs.cz
> > 2K Development: email@hidden http://www.2kdevelopment.cz
> > private email@hidden http://www.ocs.cz/oc
> > _______________________________________________
> > 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.
> >
> >
> Tom Dale
> Mail: email@hidden
> AIM: Ch8 Tom
> ICQ: 34276177
> _______________________________________________
> 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.


  • Follow-Ups:
    • Re: Copying an NSView?
      • From: Tom Dale <email@hidden>
References: 
 >Re: Copying an NSView? (From: Tom Dale <email@hidden>)

  • Prev by Date: Re: Copying an NSView?
  • Next by Date: Re: How viable is Cocoa development?
  • Previous by thread: Re: Copying an NSView?
  • Next by thread: Re: Copying an NSView?
  • Index(es):
    • Date
    • Thread