<mx:MenuBar id="myMenuBar"> <mx:XMLList> <!--DOES NOT WORK!!! menuitem label="Action" enabled="{bindableProp != null}"/--> <menuitem label="Action" enabled="{myMenuBar != null && bindableProp != null}"/> </mx:XMLList> </mx:MenuBar>
This allows me to disable the menuitem when bindableProp is null. In the above example, bindableProp is a Boolean which has been declared as Bindable. When the container is created, this bindableProp is null. Later, I set it to something non-null. The above code works fine. However, its a workaround, because if I don't include the "myMenuBar != null &&" part, then the menuitem is initially enabled (before the bindableProp has been set to a non-null value). On closer inspection "myMenuBar" can be replaces with any other non-null Bindable property, and it still works. Null properties or non-bindable properties do not work there. Also its ok to do something like: "{nonNullBindableProp.nullBindableProp != null}" but NOT "{nullBindableProp != null}" Is this a bug or am I doing something wrong? -- View this message in context: http://www.nabble.com/MenuBar-menuitem-data-binding-bug--tp20343455p20343455.html Sent from the FlexCoders mailing list archive at Nabble.com.