#pragma strict
public class Airport
{
public var USA:Array = new Array("USA", -10, 0, "New York");
public var NORWAY:Array = new Array("Norway", -3, 6, "Oslo");
public var CHINA:Array = new Array("China", 10, 0, "Beijing");
public var SOUTH_AFRICA:Array = new Array("South Africa", 0, -5, "Cape Town");
public var AirportArray:Array = new Array();
public function Airport
{
AirportArray.Push(USA);
AirportArray.Push(NORWAY);
AirportArray.Push(CHINA);
AirportArray.Push(SOUTH_AFRICA);
}
}
The worst part with things like this is you can sometimes look for upwards of an hour (usually like 10 minutes when this happens to me sometimes, but one time I think it took almost an hour out of my life) to resolve a problem as simple as
public function Airport
instead of
public function Airport()
Especially when altering arrays or null object references. I must admit that debuggers are not very friendly to new users. I’ve only seen some, only sometimes, tell you in plain english “Did you forget THIS symbol? ”
It is times like that (especially if I wasted a huge amount of time on it) that make me want to Alt-F4 my own existence. lol