I am having some trouble figuring out how to overload a function in Flash using Haxe. I know that Flash does not allow overloads but can accept function parameters without a type declared, but I am unsure as how to replicate this trick in Haxe.
EDIT: Since this does not appear to be possible, are there any known tricks that can be used to get around this limitation?
The Haxe website has an example of how to achieve this here: http://old.haxe.org/ref/optional_args
I don't think haxe supports true method overloading... not sure though. Good luck!
There was recently a discussion about this on the Haxe mailinglist: http://lists.motion-twin.com/pipermail/haxe/2010-May/035650.html
The most pertinent post is by Haxe's author: http://lists.motion-twin.com/pipermail/haxe/2010-May/035659.html
The tl;dr version is because Flash 9 doesn't support it they removed the ability to do it for all platforms.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With