FileDialog ignores fileDir
Status: Beta
Brought to you by:
netsrak
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.