Next Page > Hide TOC

NSNibConnector Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/AppKit.framework
Availability
Available in Mac OS X v10.0 and later.
Companion guide
Declared in
NSNibConnector.h

Overview

This class represents a basic connection in Interface Builder. You should not use this class directly. If you need to work with nib connections, you would use a subclass like NSNibControlConnector or NSNibOutletConnector instead. If you want to create your own type of connectors, you can also define your own custom subclasses.

Adopted Protocols

NSCoding

Tasks

Working with the Source

Working with the Destination

Working with the Connection

Instance Methods

destination

Returns the connector’s destination.

- (id)destination

Return Value

The object that is the destination of the connection.

Availability
Declared In
NSNibConnector.h

establishConnection

Establishes a connection between the source and destination object.

- (void)establishConnection

Discussion

The default implementation of this method does nothing. Subclasses must override it to establish a connection between the source and destination objects. The current label provides the description of how the two objects are connected and can be interpreted differently by different subclasses. This method is called for each connection whenever an application opens a nib file.

Availability
See Also
Declared In
NSNibConnector.h

label

Returns the label associated with the connection.

- (NSString *)label

Return Value

A string containing information about the type of connection. This value can be interpreted differently by different subclasses. For example, the NSNibControlConnector interprets this string as the selector to call as an action method.

Availability
Declared In
NSNibConnector.h

replaceObject:withObject:

Changes the connection’s source or destination object to the specified object.

- (void)replaceObject:(id)oldObject withObject:(id)newObject

Parameters
oldObject

The object you want to replace. This object can be either the current source object or the current destination object.

newObject

The replacement object.

Discussion

If the object in oldObject is not used for either the source or destination of this connection, this method does nothing.

Availability
Declared In
NSNibConnector.h

setDestination:

Sets the connector’s destination to destination.

- (void)setDestination:(id)destination

Parameters
destination

The object that is the destination of the connection.

Availability
Declared In
NSNibConnector.h

setLabel:

Sets the label for the connection.

- (void)setLabel:(NSString *)label

Parameters
label

A string containing information about the type of connection. This value can be interpreted differently by different subclasses. For example, the NSNibControlConnector interprets this string as the selector to call as an action method.

Availability
Declared In
NSNibConnector.h

setSource:

Sets the connector’s source to the specified object.

- (void)setSource:(id)source

Parameters
source

The object that is the source of the connection.

Availability
Declared In
NSNibConnector.h

source

Returns the connector’s source.

- (id)source

Return Value

The object that is the source of the connection.

Availability
Declared In
NSNibConnector.h

Next Page > Hide TOC


© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-01-22)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.