I have an object containing 3 strings, saved in an ArrayCollection.
package valueObjects
{
public class User
{
public var rowid:String;
public var userID:String;
public var username:String;
}
}
saved to an ArrayCollection named “logins”
I am struggling to display individual entries from this. I would have thought <s:Label text="{logins.username}" /> would do the trick, but apparently not, this just throws an error and <s:Label text="{logins}" /> just displays [object User]
I’m pretty new to Flash Builder and I am struggling to get my head around this.
Thanks
you have to manually assign the first object’s username as value to label property
you can do {logins.getItemAt(0).username} but that’s not safe you can have null pointer sometime, so better assign manually..