Hi,
I'm facing a binding issue. This is an example from PopUpPlayGround.mxml in
Tour de Jewel:
<j:CheckBox localId="check1" text="open/close the popup: {popup1.open}"
selected="{popup1.open}"/>
<j:PopUp id="popup1" className="somePopUpContent" modal="true"
open="{check1.selected}"
openPopUp="openPopUpHandler(event)"
closePopUp="closePopUpHandler(event)" />
if you check the CheckBok, the popup1 opens and the check label shows
"open/close
the popup: true"
then closing the popup, makes the label turns to: "open/close the popup:
false"
but, here's the problems the CheckBox is not deselected with
selected="{popup1.open}"
is this right?
Notice that I put two event handlers that throws when open and close:
public function openPopUpHandler(event:Event):void
{
trace("[openPopUp] ", event.target, popup1.content);
}
public function closePopUpHandler(event:Event):void
{
trace("[closePopUp] ", event.target, popup1.content);
check1.selected = false;
}
So I'm getting the check unselected when this line runs:
check1.selected = false;
But I'm wondering why binding works for popup.open label but no for the
check.
You can check the example here (PopUp section):
http://royale.apache.org/tourdejewel/
(ensure is not cached and see the checkbox in the left in the "Jewel Popup
(modal)")
You can check the complete code here:
https://github.com/apache/royale-asjs/blob/develop/examples/royale/TourDeJewel/src/main/royale/PopUpPlayGround.mxml
Thoughts?
--
Carlos Rovira
http://about.me/carlosrovira