AIR Error #2037: "Functions called in incorrect sequence, or earlier"
01 10 2009
After a short quiet period I'm back today to tell you something about the AIR file object. While deploying a new version of my application I ran into some problems on other systems. AIR threw the error
Not really self-speaking, huh? Doing some debugging, I found out that the error was thrown at last line of the following code:
The problem is, that the File and the FileReference classes need to be initialized with a file path, otherwise every attempt to access a property will fail. Thanks to Mike Chambers who talked about this issue earlier. His blog post really helped me a lot. I fixed this issue by changing my code to the following:
This initializes the File object with the path of the application directory, which should be fine for all cases.
What is also interesting about this topic: the error only occured on a Mac OS X system, not on my Windows machine. Have not yet been able to test this under Linux.
//Update: I still encountered some problems using this mechanism. For some reason zfile contains no valid resource on Mac OS X. Just FYI
#2037: "Functions called in incorrect sequence, or earlier"
Not really self-speaking, huh? Doing some debugging, I found out that the error was thrown at last line of the following code:
The problem is, that the File and the FileReference classes need to be initialized with a file path, otherwise every attempt to access a property will fail. Thanks to Mike Chambers who talked about this issue earlier. His blog post really helped me a lot. I fixed this issue by changing my code to the following:
This initializes the File object with the path of the application directory, which should be fine for all cases.
What is also interesting about this topic: the error only occured on a Mac OS X system, not on my Windows machine. Have not yet been able to test this under Linux.
//Update: I still encountered some problems using this mechanism. For some reason zfile contains no valid resource on Mac OS X. Just FYI
Written by Sebastian Bauer
Comments : No comments »
Categories : Adobe® AIR™
Trackbacks : No Trackbacks »






Trackbacks
No Trackbacks