I do not use binding to change dataProvider property values.  Rather, I
use an e4x expression to locate the desired node(s), then directly set
the property values I want.

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Carter
Sent: Friday, November 21, 2008 9:51 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Best practice for databinding with MenuBar?

 


I have a MenuBar where the dataProvider is specified in MXML as an
XMLList.

For the "enabled" attributes I do something like:

enabled="{allowThis()}"

However, to get databinding working I end up passing in the relevant
bindable property and then ignore it within the implementation of
allowMe().
For example:

enabled="{allowThat(myBindableVar)}"

This works, but IMHO is horrible because it requires either messing up
my
API or creating a load of functions like:

function allowThat(myBindableVar:Object):Boolean {
allowThis();
}

Is there another approach? A standard approach?

As another workaround, maybe there is a way to recalculate the enabled
flags
for the whole MenuBar? Maybe resetting the dataProvider?
-- 
View this message in context:
http://www.nabble.com/Best-practice-for-databinding-with-MenuBar--tp2062
2610p20622610.html
<http://www.nabble.com/Best-practice-for-databinding-with-MenuBar--tp206
22610p20622610.html> 
Sent from the FlexCoders mailing list archive at Nabble.com.

 

Reply via email to