Hi Weaksafety,
I created a quick sample stack (with the below script) and the included image setting methods worked as expected-
Code: Select all
on mouseDown
showPopover
end mouseDown
on showPopover
set the text of field "titoloPopup" of group "gruppoImmagini" to "test"
set the location of group "gruppoImmagini" to 247, 379
--set the imagedata of image "imgPopup" to the imagedata of image "test2"
--put image "test2" into image "imgPopup"
--set the text of image "imgPopup" to the text of image "test2"
set the visible of group "gruppoImmagini" to true
end showPopover
on mouseUp
set the visible of group "gruppoImmagini" to false
end mouseUp
I would be careful if using the imagedata property. The following is a note taken from the LiveCode dictionary-
Important! When changing the imageData property, make sure the new data is the correct size: 4 bytes per pixel in the image. If you set an image's imageData property to data whose total length is incorrect, the image appearance will be distorted.
The imageData property is related to the content of the image--changing either one changes what's displayed in the image--but they're not identical: the imageData property and the image content are in different forms, have different sizes, and include overlapping but not identical information about the picture.
The imageData, unlike the contents of the image container, is based on the picture as it's presented on the screen, not stored in the image object. This means that if you resize an image, the content of the image does not change, but its imageData does. If you create an image and then reduce its size, its imageData reflects the scaled-down, displayed image, not the original full-scale image. If you create a second image and set its imageData property to the imageData of the original image, resizing the first image back to the original dimensions displays the original image at full resolution, but resizing the second image does not, because setting its imageData transferred only the scaled-down version of the original.
Kind Regards,
Neil Roger
--
LiveCode Support Team ~
http://www.runrev.com
--