开发者

Flex: Affecting Function result on bindable boolean not generating databinding event

I have a small question. I am probably misunderstanding something, but when I do :

public function listOfProtocolsModified():void
{
    if (isAllProtocolsSelected())
    {
        _bAllProtocolsSelected = true;
    }
    else
    {
         _bAllProtocolsSelected = false;
    }
    _bModificationsMade = true;
}

My CheckBox's selected property is modified according to _bAllProtocolsSelected value, but when I do:

public function listOfProtocolsModified():void
{
    _bAllProtocolsSelected = isAllProtocolsSelected();
    _bModificationsMade = true;
}

The selected property is never updated... Of cour开发者_如何学Pythonse isAllProtocolsSelected() returns a Boolean value.

Anyone know what is happening?

Here is the content of the isAllProtocolsSelected() method as requested

        private function isAllProtocolsSelected():Boolean
        {
            var bAllActivated:Boolean = true;

            for each (var protocol:Object in _listOfProtocols)
            {
                if (protocol[consts.DPIFILE_ACTIVATE_FIELD] == "0")
                {
                    bAllActivated = false;
                    break;
                }
            }
            return bAllActivated;                
        }


Make sure _bAllProtocolsSelected is declared [Bindable]. Hope this helps...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜