Skip to main content
ISI-DWADE
Participant
November 21, 2018
Question

Mac OSX app crash when variable named 'Error'

  • November 21, 2018
  • 0 replies
  • 183 views

I recently found a discrepancy in the Flex 4.6.0 & AIR 30.0 interpreter on Mac OSX vs Windows.

When I ran the bundled program on a Windows PC, it worked fine.

When I ran the program through ADL on OSX in debug mode, it worked fine.

When I ran the program as a bundled app under OSX, it crashed.

In an area of the source code, I attempted to add a TRY:CATCH block and in the catch I tried to use the system object Error.  The compiler complained about this.

This led me to look and find a variable named 'Error'.

This variable named 'Error' (exact letter case) was defined as an object type (i.e. var Error:MyObject;). The compiler didn't complain about this.

After I changed the name of the variable to something other than 'Error' (i.e. var sndError:MyObject;), it worked on OSX as a bundled app.

I did not test this behavior under AIR 31.

This topic has been closed for replies.