Image control in a Background

J. Landman Gay jacque at hyperactivesw.com
Fri Jun 20 21:13:14 CEST 2014


On 6/20/2014, 10:23 AM, Vaughn Clement wrote:

> The image control is supposed load when the card opens and the last photo
> is to be displayed?
 >
> *on*  openCard
>
>     *set*  the defaultfolder to specialFolderPath ("documents") & "/photos/"
>
>     *--answer the files*
>
>     *if*  the number of this card >1*then*
>
>        *set*  the defaultfolder to specialFolderPath ("documents") &
> "/photos/"*then*
>
>           *if*  there is a file the short id of this card*then*
>
>              *put*  specialFolderPath ("documents") & "/photos/" & the short
> ID of this card into thePath
>
>              *set*  the filename of image "imegeField1" of this card to
> thepath
>
>           *end*  *if*
>
>        *end*  *if*
>
> *end*  openCard


Is this a direct copy/paste? This line is malformed:

  set the defaultfolder to specialFolderPath ("documents") & "/photos/" 
then <--

Remove the trailing "then". Also, the image name is misspelled as 
"imegeField1" ("e" rather than "a") which is more likely the reason for 
the problem.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list