Greg, I think Carlos is saying the example should work without the 
check1.selected=false line, but he had to add it to get the example to work.

-Alex

On 1/3/19, 10:42 AM, "Greg Dove" <[email protected]> wrote:

    Carlos, I tried the example and (so far) I don't see the issue. I get the
    visual selection state of the checkbox and the text content binding both
    updating when the popup opens or closes.
    
    
    On Fri, Jan 4, 2019 at 7:27 AM Alex Harui <[email protected]> wrote:
    
    > Is a binding being setup for closePopUp?  Check the debug .js files to see
    > if that event is listed in the _bindings array.  If it is there, debug 
into
    > it and see if a binding actually gets set up.
    >
    > -Alex
    >
    > On 1/3/19, 10:08 AM, "Carlos Rovira" <[email protected]> wrote:
    >
    >     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):
    >
    >
    > 
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Froyale.apache.org%2Ftourdejewel%2F&amp;data=02%7C01%7Caharui%40adobe.com%7Cbf6f0348539e43e80a4808d671ab3f43%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636821377677213221&amp;sdata=5FrwOb%2FW%2B%2B2FrlNXpKXhVYHfaB1tot%2BF8acux67737Q%3D&amp;reserved=0
    >
    >     (ensure is not cached and see the checkbox in the left in the "Jewel
    > Popup
    >     (modal)")
    >
    >     You can check the complete code here:
    >
    >
    > 
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fblob%2Fdevelop%2Fexamples%2Froyale%2FTourDeJewel%2Fsrc%2Fmain%2Froyale%2FPopUpPlayGround.mxml&amp;data=02%7C01%7Caharui%40adobe.com%7Cbf6f0348539e43e80a4808d671ab3f43%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636821377677213221&amp;sdata=7yYp%2F8HRKkNO95mqlOQ1EKH%2Bj8GCtmPcQCw4CveGUdw%3D&amp;reserved=0
    >
    >     Thoughts?
    >
    >
    >
    >
    >
    >
    >     --
    >     Carlos Rovira
    >
    > 
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cbf6f0348539e43e80a4808d671ab3f43%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636821377677213221&amp;sdata=ZFbvkhKObcG1NtjKqKQrjOS%2Boiwru16Ji5fIVK2WVo4%3D&amp;reserved=0
    >
    >
    >
    

Reply via email to