Image control in a Background
J. Landman Gay
jacque at hyperactivesw.com
Tue Jun 24 17:41:02 EDT 2014
On 6/24/2014, 10:35 AM, Vaughn Clement wrote:
> I am somewhat closer to the solution? I tested the correction that J.
> Landman Gay suggested where I remove the "then" at the end of the this
> line: "set the defaultfolder to specialFolderPath ("documents") &
> "/photos/" then <--"
> This had the effect of not updating the image in any card. When I added it
> back in, the image control will not change all of the cards now, but it
> will not update the current image either until I go to a different card and
> return to find the image then updated to the correct image.
The "then" is superfluous, so its removal shouldn't affect anything. A
"then" can only occur at the end of a line that begins with "if". The
engine must be ignoring the extra "then" because it isn't throwing an
error. At any rate, you don't need it.
Previously I believe you had the image in a background group with "act
like a background" turned on, which means the same image will appear on
every card that contains that background. I think you've changed that
now by turning off "act like a background" or by moving the image out of
the group. That is why only one card updates now.
The reason you need to leave the card and return in order to see the new
image content is because you have placed the command in an openCard
handler, which only triggers when you arrive at the card. Leaving and
returning to the card will cause an openCard message to be sent, which
updates the image content.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list