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

How to use UiDialogs.openFile? #20

Closed
atilacamurca opened this issue May 30, 2018 · 2 comments
Closed

How to use UiDialogs.openFile? #20

atilacamurca opened this issue May 30, 2018 · 2 comments

Comments

@atilacamurca
Copy link
Contributor

I'm trying to use UiDialogs.openFile but it requires a parameter UiWindow *parent.

How do I get a reference for my Window?

Example I'm trying to run:

const filename = libui.UiDialogs.openFile(win);
@mimecorg
Copy link
Owner

First, you have to add the ref attribute to your Window component:

<Window ref="myWindow" ...>

Then you can access the libui.UiWindow object this way:

const window = this.$refs.myWindow.window;

I will add this to the documentation.

@atilacamurca
Copy link
Contributor Author

Thanks for the quick reply!

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

No branches or pull requests

2 participants