Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: PictureVal reassign the same OS object picture
Message
 
 
À
04/06/2005 12:07:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01020236
Message ID:
01020257
Vues:
18
Hi Fabio,

No need for the second picture to repro this bug.
oPicture = LOADPICTURE(HOME(4)+"\Bitmaps\Tlbr_w95\BACK.BMP")
oImg = CREATEOBJECT("image")
oImg.PictureVal = oPicture
oImg.PictureVal = oPicture
? "handles", oPicture.Handle && Null 
oImg.PictureVal = oPicture   && Error
>Reassign the same OS's object reference to a Image.PicturVal,
>the OS's picture object it is released.
>
>Repro:
>
>CLEAR
>oPicture1 = LOADPICTURE(HOME(4)+"\Bitmaps\Tlbr_w95\ARC.BMP")
>oPicture2 = LOADPICTURE(HOME(4)+"\Bitmaps\Tlbr_w95\BACK.BMP")
>
>WITH CREATEOBJECT("image")
>	.PictureVal = m.oPicture1
>	.PictureVal = m.oPicture2
>	.PictureVal = m.oPicture1
>	.PictureVal = m.oPicture2
>	? "handles",m.oPicture1.Handle,m.oPicture2.Handle,"objects" at 40,m.oPicture1,m.oPicture2
>	* reassign the same image
>	.PictureVal = m.oPicture2
>	? "handles",m.oPicture1.Handle,m.oPicture2.Handle,"objects" at 40,m.oPicture1,m.oPicture2
>	.PictureVal = m.oPicture1
>	? "handles",m.oPicture1.Handle,m.oPicture2.Handle,"objects" at 40,m.oPicture1,m.oPicture2
>	* reassign the same image
>	.PictureVal = m.oPicture1
>	? "handles",m.oPicture1.Handle,m.oPicture2.Handle,"objects" at 40,m.oPicture1,m.oPicture2
>ENDWITH
>
>RELEASE oPicture1,oPicture2
>
>* workaround it is obvious : clear the PictureVal before to reassign
>
<snip>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform