Re: Simple Interface Connection Question
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