0

The following line of code sometimes throws an exception:

var stopScheduleItems:Array = [];

The exception being thrown:

TypeError: Error #1010: A term is undefined and has no properties.

I cannot understand why this could happen when creating a new array. Could anyone provide some insight. Thanks

1 Answer 1

1

This line can't be throwing this error.

It's more likely that you are trying to access a method of the stopScheduleItems object before it's defined. For example something like this:

stopScheduleItems.pop();
var stopScheduleItems:Array = [];
Sign up to request clarification or add additional context in comments.

3 Comments

Strange.. If you're debugging in Flash Builder make sure you haven't removed a line while debugging, because this often results in incorrect debugging lines shown (so when you see debugger standing at for example line 7, it is actually standing at 7 - deletedLineCount). I can't think of any other thing that could have caused this error.
You were right. Another line was actually throwing the error. Thanks
No problem. Glad I could help you out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.