Page 1 of 1

Photo Gallery Example solution question

PostPosted: Thu Dec 02, 2004 1:16 am
by 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.

Re: Photo Gallery Example solution question

PostPosted: Thu Dec 02, 2004 10:49 am
by Riccardino
DFehrenbach wrote: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 :-)

PostPosted: Thu Dec 02, 2004 1:09 pm
by Harjo
Use the file-plugin with a global instead!

Try this: create a global: lastfilepath an make the method:

Code: Select all
filename = plugins.file.showFileOpenDialog(0,globals.lastfilepath);
if (filename)//for cancel
{
//do something here
globals.lastfilepath = normalizedFileName

}

PostPosted: Thu Dec 02, 2004 1:38 pm
by maarten
you can also store lastUsedFilePath in your database, linked to user_id.