I'm having some trouble extending classes in MXML, I will attempt to explain here, but I have also uploaded a Sample Flash Builder Project.
Consider that I have 2 classes:
game.implementation.base.view.MainView
game.implementation.ipad.view.MainView
note that they have slightly different package names (one is for ipad).
The idea is that the ipad
package's classes will extend the classes of the base
package.
Doing as described above produces an error:
Ambiguous reference to MainView. [Generated code (use -keep to save): Path: D:\FlexTests\Tests\bin-debug\generated\game\implementation\ipad\view\MainView-generated.as, Line: 95, Column: 62]
I have reviewed the generated code, the offending function is:
_watcherSetupUtil.setup(this,
function(propertyName:String):* { return target[propertyName]; },
function(propertyName:String):* { return /** HERE **/ MainView[propertyName]; },
bindings,
watchers);
I have narrowed the problem down, I think it is caused by:
- Extending class having the same name
- Extending class using bindings in the MXML
Is there a way to fix this without doing either of the above?
I would prefer not to rename the classes, and obviously removing the bindings is not an option.