You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #457 - zed-industries:ns-save-panel, r=jrmuizel
Add NSSavePanel binding
This PR adds bindings to some basic `NSSavePanel` APIs. In Cocoa, `NSSavePanel` is a superclass of `NSOpenPanel`, which I added bindings for in #454.
Example:
```rust
let panel = NSSavePanel::savePanel(nil);
panel.setDirectoryURL(the_url);
let response = panel.runModal();
if response == NSModalResponse::NSModalResponseOk {
let url_ptr = panel.URL().absoluteString().UTF8String();
let url = CStr::from_ptr(url_ptr).to_string_lossy();
eprintln!("You picked URL {}", url);
}
```
0 commit comments