Instance Property

numberOfValidItemsForDrop

Specifies the number of valid items for a drop operation.

Required.

Declaration

@property NSInteger numberOfValidItemsForDrop;

Discussion

During draggingEntered: or draggingUpdated:, you are responsible for returning the drag operation. In some cases, you may accept some, but not all items on the dragging pasteboard. (For example, your application may only accept image files.)

If you only accept some of the items, set this property to the number of items accepted so the drag manager can update the drag count badge.

When updateDraggingItemsForDrag: is called, you should set the image of non-valid dragging items to nil. If none of the drag items are valid then you should not updateItems:, simply return NSDragOperationNone from your implementation of draggingEntered: and, or draggingUpdated: and do not modify any drag item properties.

See Also

Obtaining Information About the Dragging Session

draggingPasteboard

Returns the pasteboard object that holds the data being dragged.

Required.

draggingSequenceNumber

Returns a number that uniquely identifies the dragging session.

Required.

draggingSource

Returns the source, or owner, of the dragged data.

Required.

draggingSourceOperationMask

Returns the dragging operation mask of the dragging source.

Required.

draggingLocation

Returns the current location of the mouse pointer in the base coordinate system of the destination object’s window.

Required.

draggingDestinationWindow

Returns the destination window for the dragging operation.

Required.

- namesOfPromisedFilesDroppedAtDestination:

Sets the drop location for promised files and returns the names of the files that the receiver promises to create there.

Required.

Deprecated