Image loads happen asynchronously, so you need to assign an onload
handler to the image object. The handler is called once the image is
loaded.
On Jun 10, 2005, at 12:24 PM, Groups wrote:
I have a widget that downloads an image and then displays it. I get
the image by simply setting an Image source to the URL (myImage.src
= URLStr;). I wait a few seconds and then display the image as:
context.drawImage(myImage, 10, 10 );
This works fine. The problem is that I don't know how long it takes
to download the image. If I don't wait enough seconds before I draw
it I get zip. Is there any "simple" way to know when the image
download is complete? Thanks.
Darryl
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/email@hidden