尝试绑定属性时出现模糊的引用错误。下面的代码:使用CodeBehind模式时的不准确引用
MXML
<?xml version="1.0" encoding="utf-8"?>
<custom:Test
xmlns:mx = "library://ns.adobe.com/flex/mx"
xmlns:fx = "http://ns.adobe.com/mxml/2009"
xmlns:custom = "CodeBehind.*">
<mx:TextInput id = "foo" text = "foo!">
</mx:TextInput>
<mx:TextInput id = "bar" text = "{foo}">
</mx:TextInput>
</custom:Test>
代码隐藏
package CodeBehind
{
import mx.containers.Panel;
public class Test extends Panel
{
}
}
这里的错误本身:
/Front/Test.mxml(-1): Error: Ambiguous reference to Test.
<?xml version="1.0" encoding="utf-8"?>
奇怪的是,它甚至没有提到绑定的属性.. 。
当你有机会时,不要忘记将其标记为已接受的答案。 – 2011-04-04 15:29:00