I have a pure Action Script 3 project which I am compiling with the Flex 4 SDK. I have a standard Makefile which automatically invokes compc, mxmlc, and asdoc as appropriate. The project is compiling cleanly with no errors or warnings on my Mac OS X 10.4+ computer; however, when sharing it with a coworker developing on Windows XP (with Cygwin installed), he gets a very large list of "incompatible signature" errors. Why is he getting those errors? The signatures don't appear to be incompatible.
NOTE: The signatures in question are "original" and "export", used like this:
public interface AbstractX { function original() : Object; function export() : Object }
public class ImportX implements AbstractX { public ImportX(obj : Object) { _loadedobj = obj; _exportobj = obj.export(); } public static function wrap(obj : Object) : AbstractX { var result : AbstractX = null; if ( obj != null ){ if ( obj is AbstractX ){ result = obj as AbstractX; }else if ( obj.original() is AbstractX ){ result = obj.original() as AbstractX; }else{ result = new ImportX(obj); } } return result; } public function original() : Object { return _loadedobj; } public function export() : Object { return _exportobj; } private var _loadedobj : Object = null; private var _exportobj : Object = null; }
public class X implements AbstractX { public function X() : void { //... } public function original() : Object { return this; } public function export() : Object { if ( ! _export ){ _export = new ExportX(this); } return _export; } private var _export : Object = null; }
NOTE: The code above is part of my solution to How do I make an Action Script 3 class, used in two SWF files, resolve to the same class when one SWF dynamically loads the other?