So I've successfully created my first array using the following code:
Code: Select all
repeat until revQueryIsAtEnd(theData)
add 1 to tCounter
put revDatabaseColumnNamed(theData, "f_UserName") into tUserList[tCounter]["UserName"]
put revDatabaseColumnNamed(theData, "f_Email") into tUserList[tCounter]["Email"]
put revDatabaseColumnNamed(theData, "f_Avatar") into tUserList[tCounter]["Avatar"]
revMoveToNextRecord theData
end repeat
set the dgData of group "User List" to tUserList
From there I've gone into my data grid, group "User List", to set the row template and adjust the script accordingly.
I have four objects in group id 1012: fld "email", fld "username", img "avatar" and graphic "background"
So in the handler fillInData of btn "behavior script" I have:
Code: Select all
set the text of field "Email Address" of me to tUserList["Email"]
set the text of field "Username" of me to tUserList["Username"]
set the filename of image "Avatar" of me to tUserList["Avatar"]
I think I did everything that was in the guide. What am I missing here? What else do I have to do?
Thanks for your time!
Ivan