Release 5.  Copyright ©1994-1998 by TipTop Software, Inc.  All Rights Reserved.






TTObjectWell




Inherits From: NSButton
Declared In: <ObjAppKit/TTObjectWell.h>




Class Description

Instances of the ObjectWell class can be used both as a dragging source and a dragging destination.  When an ObjectWell is used as a dragging source, it represents another object (-dragObject).  When an object is dragged from one well and then dropped into a destination well, the destination well sends an action to its target.

If an object is dragged from a well in one application and dropped into a well of another application, a DO connection is automatically established, and the -droppedObject will actually be a proxy object corresponding to the -dragObject of the source well in the other application!




Method Types

auxObject
+ connectionName
dragDestination
dragObject
dragSource
droppedObject
isLocal
performDrop:
setAuxObject:
setDragDestination:
setDragObject:
setDragSource:




Class Methods

connectionName
+ (NSString *)connectionName

Returns the name of a connection to which a remote application should connect in order to obtain the id of an object dropped into it.  The default implementation of this method returns [[TTReceptionist sharedInstance] connectionName].  The remote application will send the -objectForKey: message to the root object registered under the connection name in order to obtain the id of the dropped object.




Instance Methods

auxObject
  auxObject

Returns the auxiliary object.

See also:  -setAuxObject:




dragDestination
  (BOOL)dragDestination

Returns YES if the receiver is configured to act as a drag destination.

See also:  -setDragDestination:, -dragSource




dragObject
  dragObject

Returns the drag object, i.e., the object which the object well represents (if configured to be a dragSoruce).

See also:  -setDragObject:, -setDragSource:




dragSource
  (BOOL)dragSource

Returns YES if the receiver is configured to act as a drag source.

See also:  -setDragSource:, -dragDestination




droppedObject
  droppedObject

Returns the object that was dropped into the object well.  If the object was dragged from another application (possibly running on a different computer), a DO connection between the applications is automatically established, and the proxy object representing the remote draggedObject is returned.

See also:  -isLocal, -setDragDestination:




isLocal
  (BOOL)isLocal

Returns YES if the dropped object is an object within the same application.

See also:  -droppedObject




performDrop:
  (void)performDrop:sender

Sends the action to the target object.




setAuxObject:
  (void)setAuxObject:o

Sets the auxiliary object.  You can connect any object to the auxObject outlet (e.g., a TTSymbolTable), so that you have a convenient access to that object in your setup hook.

See also:  -auxObject




setDragDestination:
  (void)setDragDestination:(BOOL)f

Configures the receiver to act as a drag destination.

See also:  -dragDestination, -setDragDestination:




setDragObject:
  (void)setDragObject:(id)o

Sets the drag object.  When an ObjectWell object is used as a drag source, it is used to represent some other object (dragObject).  When the user drags and drops one object well into another, the destination object well receives the dragObject which is associated with the source object well.

See also:  -setDragSource:




setDragSource:
  (void)setDragSource:(BOOL)f

Configures the receiver to act as a drag source.

See also:  -dragSource, -setDragDestination:




###