• 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: Loading a view from a nib multiple times
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading a view from a nib multiple times


  • Subject: Re: Loading a view from a nib multiple times
  • From: Raphael Sebbe <email@hidden>
  • Date: Fri, 24 Sep 2004 16:57:02 +0200

I would create multiple instances of the owner, each loading that NIB.

Raphael

On 24 Sep 2004, at 16:05, John Fox wrote:

Hi:

In my app, I have a "sub view" that contains a button (with an image) and a text field. I've created this view in IB and have connected my controller to the button, text field and the view itself so that I have IBOutlets for all. Then as necessary, I can programmatically add this view to my "main" view, positioning it on screen as necessary and receiving messages from the button to my controller. When the nib file is loaded, the button is initialized with the image, and the text field has its default stringValue already set.

My question is how can I add more than one instance of this same view? If I copy the view in code, I get an exception, so I'm stumped. I know I can programatically create my view, and create the button and text field within the view, but if I have to do this, what good is having created it in IB in the first place?

Any advice greatly appreciated.

John

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
cinder.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
  • Follow-Ups:
    • Re: Loading a view from a nib multiple times
      • From: "Geert B. Clemmensen" <email@hidden>
References: 
 >Loading a view from a nib multiple times (From: John Fox <email@hidden>)

  • Prev by Date: Loading a view from a nib multiple times
  • Next by Date: Re: Regarding Font style in an NSTextView
  • Previous by thread: Loading a view from a nib multiple times
  • Next by thread: Re: Loading a view from a nib multiple times
  • Index(es):
    • Date
    • Thread