problem | |
adobe flex4 AS3.0, filestraem (air) How to write a file where the application is located | the mystery "fileWriteResource" hidden error | how to write files in applicationDirectory (where is not allowed) [tested in windows only] --- > page by dennis | |
solution | |
How to write a file where the application is located in the follow example, the variable "filename" is String and has as value the the file name without path, i.e.: "sample.txt" the follow code doesn't work, produces an error "fileWriteResource" that is not even thrown! var newFile:File=File.applicationDirectory.resolvePath(filename); use the follow code: var newFile:File=File(File.getRootDirectories()[0]).resolvePath(File.applicationDirectory.nativePath+File.separator+filename); //I am not kidding... it is working |
Flexache, is the pain you feel in your brain when you coding on Adobe’s Flex Builder, Flash builder with Flex SDK and Actionscript in general. The pain is starting from the eyes, as you can’t believe what you see and is getting deep in your head as you can’t fix. In this blog I‘ll give you painkiller to get out of a lot strange troubles showing solutions and techniques in Flex.
Thursday, 28 April 2011
flex, air, How to write a file where the application is located
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment