Loading a view from a nib multiple times
Loading a view from a nib multiple times
- Subject: Loading a view from a nib multiple times
- From: John Fox <email@hidden>
- Date: Fri, 24 Sep 2004 07:05:02 -0700
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:
This email sent to email@hidden