2 Replies Latest reply on Apr 14, 2009 10:58 AM by alice_data

    Call to a possibly undefined method setPropertyIsEnumerable?




        I am trying to accomplish using doubleClick events on dateChoosers. Below is the code that is working:


                    <mx:Label text="Simple DateChooser control."/>
                    <mx:DateChooser id="dateChooser1" doubleClickEnabled="true"
                    <mx:Label id="selection"  color="blue" text="Date selected:"/>


        I tried putting in doubleClickEnabled as true in Actionscript, and then call the event, and this is the syntax I used:


           //enable the double Click Enabled Property

                         dch.addEventListener("doubleClick", useDate2);


        This did not work, and I got this error instead: 1061: Call to a possibly undefined method setPropertyIsEnumerable through a reference with static type mx.controls:DateChooser.   


        I tried to find a suitable import statement to insert in my code, but I am not sure what to put there. Could anyone please give me a hint what to do here to get my code to accept the method?


      Thanks in advance.



        • 2. Re: Call to a possibly undefined method setPropertyIsEnumerable?
          alice_data Level 1

          Hi, Ryan:


            Thanks, I got that to work, but it seems like the doubleClick does not allow me to use it on the dateChooser. Here is the code:

              The MXML:


                     <mx:VBox id="box2">

                      <mx:DateChooser id="dch" doubleClickEnabled="true"


              The same thing in Actionscript, but not working:


               dch = new DateChooser();

               dch.addEventListener("change", displayDate);

               dch.doubleClickEnabled = true;


            //Got an error saying TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::MouseEvent@20112769 to     




             Could you give me some pointers on what I have wrong here?

          Thanks for your help.