9 Replies Latest reply on Nov 23, 2010 7:34 AM by nikos101

    Not able to cast object in dataprovider  to VO

    nikos101 Level 2

      What are the conditions to be able to cast like this:

       

          <s:DropDownList prompt="Select user" labelField="name" id="users" width="240"  skinClass="nikos.skins.comboBoxDropDown_Long_blueGrad">
                  <s:change>
                      <![CDATA[
                      appUserChanged.dispatch(users.selectedItem as model.vo.User);
                      ]]>
                  </s:change>
                 
              </s:DropDownList>

       

       

       

       

      the fields in the objects in the dataprovider match with User but I'm still getting null after the cast.

       

      package model.vo
      {
        
          [Bindable]
          public class User
          {
              public var SAMAccountName:String;
              public var name:String;
              public var email:String;
              public var commentsView:Boolean;
              public var commentsUsersSelect:Boolean;
              public var ratingsView:Boolean;
              public var dateCreated:Boolean;

       

          }
      }

       

      thanks