Select folder return value

A selectFolder example is available here http://processing.org/reference/selectFolder_.html, however i need the absolute path to be returned, and selectFolder seem to work only with void. Is there a way to return the value to another method?

Answers

  • It looks like the path is passed to the callback function that you pass into the method. Can you provide an example sketch demonstrating the problem you're having with that?

  • Answer ✓

    Assign selection.getAbsolutePath() to a global variable.

    Don't forget that selectFolder returns immediately: it is asynchronous.

Sign In or Register to comment.