Data Grid - Images not sticking

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 489
Joined: Thu Sep 04, 2008 6:23 am

Data Grid - Images not sticking

Post by jameshale » Tue Jul 17, 2012 6:07 am

I have a data grid in FORM form and have an image being placed with each record.
Following the example given in the Data Grid lessons everything works except for one thing.
The image doesn't stick.
If I have three records, only the first record displays the image BUT it is the image of the 3rd record.
Records 2 and three have a blank image.

The data is in an array with four variables
data[x]["name"] <- text
data[x]["filename"] <- text
data[x]["current_book"] <- text
data[x]["cover_image'"] <- image data

The FillInData is as follows:

on FillInData pDataArray
set the text of field "Title" of me to pDataArray["name"]
set the text of field "filename" of me to pDataArray["filename"]
set the text of field "Current" of me to pDataArray["current_book"]
put pDataArray["cover_image"] into image "image"
end FillInData

So everything gets filled in correctly except the image which, as I said only shows for the last image read, but placed in the first image position.

what am I doing wrong?

James

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Data Grid - Images not sticking

Post by Klaus » Tue Jul 17, 2012 12:18 pm

Hi James,

of me :D
...
put pDataArray["cover_image"] into image "image" OF ME
## sorry for being so egocentric today :D
...

Best

Klaus

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 489
Joined: Thu Sep 04, 2008 6:23 am

Re: Data Grid - Images not sticking

Post by jameshale » Tue Jul 17, 2012 3:06 pm

AAhhh!
As they said in a song that was a hit many years ago over here, "ego is not a dirty word."

Thank you so much.

all works as expected now.

James

Post Reply