is the selectedItem returning something?Or is null and the casting is failing?
selected item is an object like this:
users.selectedItem = Object (@13d743e9)
commentsUsersSelect = false
commentsView = true
dateCreated = Date (@13d7c161)
email = "test"
name = "test"
ratingsView = false
SAMAccountName = "test"
I think you should see a custom object in there not a generic one ...
nope I def see this object
i dont believe you can cast in that way but you could get round it so:
appUserChanged.dispatch(new model.vo.User(users.selectedItem.SAMAccountName, param2, etc..));
and add a constructor to the User class:
public function User(SAMAccountName:String, etc...)
this.SAMAccountName = SAMAccountName;
Can you show me how you populate your list wit users?
protected function handleUsersArrived():void
view.users.dataProvider = userModel.userList;
Thanks Lee, the other way I could do it is use A vector of Users
shame you cant do this in fb4
That is why Eclipse has two features to help you generate these constructor instantly: Generate Constructor using Field and Generate Constructor from Superclass