• 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: Simple Interface Connection Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple Interface Connection Question


  • Subject: Re: Simple Interface Connection Question
  • From: Keary Suska <email@hidden>
  • Date: Tue, 24 Apr 2007 18:56:41 -0600
  • Thread-topic: Simple Interface Connection Question

on 4/24/07 2:59 PM, email@hidden purportedly said:

> I know this is a simple question, but I've failed to find the answer
> anywhere. How do I connect classes between interface files? Thanks.

Do you mean Interface Builder .nib files?  Searching on "nib" instead of
"interface" will yield better results.

The short answer is yes and no. In Interface Builder, you cannot connect an
outlet of an object in one nib to an object in a different nib. In your
code, however, you can approach this issue in a number of ways. It all
depends on your application structure and what you are trying to do.

One common approach I like to call the "proxy" approach. That is, the
connection is "proxied" through the file's owner. In this approach, one of
the file's owner objects will maintain a reference to either the other nib's
file's owner, or the object that owns the file's owner. As long as an object
has a path to any object, it can send messages to that object. What makes
this work for outlets is that most, if not all, outlets can be set using an
accessor method. Problem solved.

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Simple Interface Connection Question
      • From: Uli Kusterer <email@hidden>
References: 
 >Simple Interface Connection Question (From: hac <email@hidden>)

  • Prev by Date: Re: Core Data using only one object
  • Next by Date: Re: Core Data using only one object
  • Previous by thread: Simple Interface Connection Question
  • Next by thread: Re: Simple Interface Connection Question
  • Index(es):
    • Date
    • Thread