I found the example solution quite interesting. One nagging question is:
How can one start the application.showFileOpenDialog with the path that was used last? Starting at the root position each time is very inconvenient if you have a large number of images to add to the album.
DFehrenbach:
I found the example solution quite interesting. One nagging question is:
How can one start the application.showFileOpenDialog with the path that was used last? Starting at the root position each time is very inconvenient if you have a large number of images to add to the album.
Even if I’m afraid it’s a java thing, I strongly agree with this point
Use the file-plugin with a global instead!
Try this: create a global: lastfilepath an make the method:
filename = plugins.file.showFileOpenDialog(0,globals.lastfilepath);
if (filename)//for cancel
{
//do something here
globals.lastfilepath = normalizedFileName
}
you can also store lastUsedFilePath in your database, linked to user_id.