Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: PictureVal reassign the same OS object picture
Message
 
 
To
04/06/2005 12:07:39
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01020236
Message ID:
01020257
Views:
20
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform