Try attaching a listener to File.desktopDirectory

On 8/19/11 8:40 AM, "sdl1326" <azsl1326-em...@yahoo.com> wrote:






I am getting the following error:

Error #2044: Unhandled IOErrorEvent:. text=Error #3003: File or directory does 
not exist
How can I trap this error? I have tried using a Try/Catch as well as a listener 
- see code below:



try {

var sourceFile:File = new File();

sourceFile.addEventListener(IOErrorEvent.IO_ERROR,onSourceFileIoError);

sourceFile = File.desktopDirectory.resolvePath( model.networkDriveLetter + "\\" 
+ event.payload.asset_location );

}
catch(e:Error){trace('an error has occurred')};


However, neither of these seems to trap the error. Suggestions?

Thanks, in advance.





--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui

Reply via email to