嘗試綁定屬性時出現模糊的引用錯誤。下面的代碼:使用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