Using FileDialog in Vala

From the docs for Gtk.FileDialog.save ()

This function initiates a file save operation by presenting a file chooser dialog to the user.

The callback will be called when the dialog is dismissed. It should call [method@Gtk.FileDialog.save_finish] to obtain the result.

My issue and question is around the fact that there is no save_finish method listed in the docs. Similarly missing are open_finish, select_folder_finish etc. Is there something I am missing or is the Vala interface to these widgets incomplete?

You either use it together with yield, e.g. File file = yield file_dialog.save which will call the _finish method for you, or, if you use the explicit begin() without yield, it is renamed to .end(). See Projects/Vala/AsyncSamples - GNOME Wiki! for an example

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.