Loading...
 
[Show/Hide Right Column]

Development

What?

Okay, this is getting ridiculous. FLEX not only does not allow method overloading, but DOES NOT ALLOW CONSTRUCTOR OVERLOADING. So, you'd better choose the right prototype the first time, because YOU ONLY GET ONE CHANCE.

This is ridiculous. If you can't implement method overloading then you have no business making a language. I now require from Adobe:
  1. A well-reasoned explanation why they have chosen to be total morons about this.
  2. An apology.

I have an object which I instantiate with XML data. I pass the data directly into the constructor and everything's great. But now I find that in one place I will need to clone this object, and Flex has no clone method. They have a deep copy, which is great, but once you've deep-copied your class you can't cast it back to the original class (I wouldn't mind an apology for this, either).

So you have to write your own clone method. That's fine, but I've already used my one constructor in the world and it relies on XML data. BUT IF I DON'T HAVE ACCESS TO THAT XML DATA NOW THAT'S LIKE 100 YEARS IN THE PAST. At this point it would be nice to be able to write a second constructor. Even a private one. TOO BAD.

I aint going back into the code and changing every place that uses the old constructor. So, now I'm faced with the necessity of adding what amounts to a childish, amateurish hack. In other words,


public function myObject(myXML:XML):void {
  if (myXML==null) return;
  ...
}



Isn't that fantastic? I love it.

Really, this is not winning me over.