<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPathControl/setDraggingSourceOperationMask(_:forLocal:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPathControl(im)setDraggingSourceOperationMask:forLocal:"
  },
  "title" : "setDraggingSourceOperationMask(_:forLocal:)"
}
-->

# setDraggingSourceOperationMask(_:forLocal:)

Configures the drag operation mask.

```
func setDraggingSourceOperationMask(_ mask: NSDragOperation, forLocal isLocal: Bool)
```

## Parameters

`mask`

The types of drag operations allowed.

`isLocal`

If <doc://com.apple.documentation/documentation/Swift/true>, `mask` applies when the drag destination object is in the same application as the receiver; if <doc://com.apple.documentation/documentation/Swift/false>, `mask` applies when the destination object is outside the receiver’s application.

## Discussion

This method configures the default return value of <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/draggingSourceOperationMaskForLocal:>. By default, this method returns [`every`](/documentation/AppKit/NSDragOperation/every) when `isLocal` is <doc://com.apple.documentation/documentation/Swift/true> and [`NSDragOperationNone`](/documentation/AppKit/NSDragOperation/NSDragOperationNone) when `isLocal` is <doc://com.apple.documentation/documentation/Swift/false>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)