reestablishing IBOutlets from initWithCoder ?
reestablishing IBOutlets from initWithCoder ?
- Subject: reestablishing IBOutlets from initWithCoder ?
- From: Robert Miller <email@hidden>
- Date: Thu, 24 Jan 2002 16:29:43 -0500
- Organization: RFM & Associates
Hello,
This is perhaps a rather unique scenario (then again maybe not but I
haven't been able to figure it out). I have a custom view subclass of
NSView that has IBOutlets instance variables defined in it for things
like buttons and popup menus, and other views. When I archive /
unarchive the custom view everything gets restored properly except the
IBOutlet instance values. Since archiving an NSView handles the
archiving of its subviews some of which are my IBOutlet object
references I don't want to rearchive my IBOutlet instances. Is there
some clever way of reestablishing the IBOutlet connections when
unarchiving ? I've tried using tag values for some of the subviews and
that works by looking for the tag using 'viewWithTag' inside of my
initWithCoder override but that solution isn't the greatest since not
all cocoa objects provide a tag value in their inspector window. Any
ideas on how to reconnect IBOutlets from an unarchive operation ?
Thanks in advance for any help,
Regards,
Bob M.