• 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: reestablishing IBOutlets from initWithCoder ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reestablishing IBOutlets from initWithCoder ?


  • Subject: Re: reestablishing IBOutlets from initWithCoder ?
  • From: Vince DeMarco <email@hidden>
  • Date: Thu, 24 Jan 2002 14:38:51 -0800

On Thursday, January 24, 2002, at 01:29 PM, Robert Miller wrote:

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 ?


I don't understand what you are after. Interface Builder archives the connections separately from the objects in the nib file.

For example NSButton "knows" how to archive references to its target and action, but
IB doesn't let NSButton do the archiving, instead its done outside of the object.

vince


  • Follow-Ups:
    • Re: reestablishing IBOutlets from initWithCoder ?
      • From: Robert Miller <email@hidden>
References: 
 >reestablishing IBOutlets from initWithCoder ? (From: Robert Miller <email@hidden>)

  • Prev by Date: Re: Cocoa basic data types?
  • Next by Date: Re: Multiple invocations of awakeFromNib on a single instance?
  • Previous by thread: reestablishing IBOutlets from initWithCoder ?
  • Next by thread: Re: reestablishing IBOutlets from initWithCoder ?
  • Index(es):
    • Date
    • Thread