...

Questions - trace()

jerry62704
04-01-2009, 05:05 PM
I have two questions. One is why I get an error on a trace. The other will be in a different thread. Here is the code:
public var tempArray:Array = FSL.getEnglishYesNo();
trace(tempArray);


"FSL" is a class that has all the language properties. There is a "spanishYesNo" to match the "englishYesNo" for example. Here is the error that the trace statement has:
1120: Access of undefined property tempArray.

It doesn't make much sense to me that the immediately preceding statement isn't visible - the variable to be traced is defined in the immediately prior statement. The error also occurs if you have literals put into the array.

This is a compile time error found by doing a "project" "clean".

ad7
10-18-2010, 10:51 AM
Adding the trace statement inside a function will make it work.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum