Skip to main content
Inspiring
March 18, 2013
Question

browseForDirectory Not Firing Event

  • March 18, 2013
  • 1 reply
  • 405 views

Hi,

I'm testing this on a Mac, and tried it with AIR 3.2 & 3.5. The below code does not fire a SELECT event when I press the open button in the OS's select directory dialog. However, if I remove the resolvePath("../../images") function, and then I browse for a different folder in the select directory dialog, it will fire the event as expected. I ma using the resolvePath method to pre-select a destination directory so that the user can just presss select in the dialog, however unless I manually browse for a save directory, the event will not fire.

var docsDir:File = File.documentsDirectory.resolvePath(this.xmlDownloadDir);

try

          {

                    docsDir.resolvePath("../../images").browseForDirectory("Specify image download directory");

                    docsDir.addEventListener(Event.SELECT, downloadImages);

          }

This topic has been closed for replies.

1 reply

leejkAuthor
Inspiring
March 21, 2013

Does anyone see anything wrong with my coding? Else should I log this?