Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Native] Implement the macOS/Cocoa and Gtk File Dialogs #656

Merged
merged 20 commits into from
Dec 6, 2019

Conversation

zbaylin
Copy link
Member

@zbaylin zbaylin commented Nov 26, 2019

EDIT: This is now fixed, and there is more information below.

This provides bindings to NSOpenPanel. This is in response to #444 by @Et7f3.

I'm so close, but for some reason, I keep getting strange memory errors on any operations on the string(s) returned.

For example, the code

Console.log("WORKS:");
Console.log(x);
Console.log("CRASHES:");
Console.log("" ++ x);

results in
error

Hopefully some fresh eyes can help with this.

@Et7f3, any help would be greatly appreciated!

@Et7f3
Copy link
Member

Et7f3 commented Nov 26, 2019

Can you select file extention ? like "*.txt". On windows we can. It may be useful to add function to generate the string if it haven't the same syntax.

@zbaylin
Copy link
Member Author

zbaylin commented Nov 26, 2019

yes you can -- I haven't pushed it yet but I will when I get back home.

@zbaylin
Copy link
Member Author

zbaylin commented Nov 27, 2019

I fixed the alloc error. It was a result of me mistakenly adding [@noalloc] before my external declaration. Now the dialog is fully functional. I will add more functionality to it (changing the "OK" button text, allowing opening directories, disallowing opening files, etc.)

@zbaylin zbaylin changed the title [Native] Implement the macOS/Cocoa File Dialog [Native] Implement the macOS/Cocoa and Gtk File Dialogs Nov 29, 2019
@zbaylin
Copy link
Member Author

zbaylin commented Nov 29, 2019

I also am now adding bindings to the Gtk/Linux file dialog.

zbaylin and others added 2 commits December 4, 2019 19:52
Signed-off-by: Zach Baylin <zbaylin@gmail.com>
@bryphe
Copy link
Member

bryphe commented Dec 6, 2019

Thank you @zbaylin and @Et7f3 ! This is awesome!

@bryphe bryphe merged commit 23aab29 into revery-ui:master Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants