Search code examples
actionscript-3apache-flexflex4.6hasownproperty

Flex 4.6 hasOwnProperty not working


I upgraded my project from Flex 4.0 to Flex 4.6 and everything seemed to work no major errors.

But all of a sudden: I get

TypeError: Error #1009: Cannot access a property or method of a null object reference.

when using hasOwnProperty on code that works perfectly in Flex 4.0

The code in question is:

if( current.hasOwnProperty("x") ) current.x = translation.x + originalGeometry.x;

Can anyone please advise me as to how I get around this.

Please and thank you.

C


Solution

  • The problem was due to another object which was null thanks to upgrading the project to flex 4.6