<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSOpenSavePanelDelegate/panel(_:shouldEnable:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSOpenSavePanelDelegate(im)panel:shouldEnableURL:"
  },
  "title" : "panel(_:shouldEnable:)"
}
-->

# panel(_:shouldEnable:)

Asks the delegate whether the specified URL should be enabled in the Open panel.

```
@MainActor optional func panel(_ sender: Any, shouldEnable url: URL) -> Bool
```

## Parameters

`sender`

The panel that asks whether the URL should be enabled.

`url`

The URL for you to check.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if you want the panel to display the item at the specifed URL as enabled, or <doc://com.apple.documentation/documentation/Swift/false> to display it as disabled.

## Discussion

Save panels do not call this method; they always disable URLs. Implementations of this method should be fast to avoid stalling the user interface. Use [`panel(_:validate:)`](/documentation/AppKit/NSOpenSavePanelDelegate/panel(_:validate:)) instead if processing will take a long time.

---

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)