Menu

#25 FileDialog ignores fileDir

0.1
open
nobody
General (13)
5
2005-02-09
2005-02-09
Pete K.
No

FileDialog.getSelectedFile() returns "fileDir + selectedFile".
However, constructor accepts newFileDir parameter but never sets
fileDir member variable.

To reproduce in action: have getDemoData.php return a non-
blank prefix on first line, then a bunch of links. Go to applet and
choose "Insert Anchor" > "Insert from Server". Choose any link,
and click "Accept". Text in the "Insert Anchor" dialog will not
include the prefix.

To fix: change the FileDialog() constructor line from:

newFileDir = newFileDir + "/";

to

fileDir = newFileDir + "/";

For bonus points: can you take away the + "/" ? I'm trying to use
a CGI prefix (prefix is "/index.php?page=") and that slash messes
me up...

Thanks!
Pete K.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB