Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Need help Updating Images whilst app is running?

Hi,


I am building an application in xcode with applescript and obj-c. It basically trawls through lots of links looking for specific images, the whole process takes about a minute but the images don't update till the very end.


How would I go about changing this so that the images updated as soon as they were found?


Any help would be appreciated! A sample of my code is pasted below...


try

set imageurl to ("http://static.guim.co.uk/sys-images/Technology/Pix/pictures/2012/8/8/13444203329 67/Google-basketball-008.jpg")

set theURL to current application's NSURL's URLWithString_(imageURL)

set theImage to current application's NSImage's alloc's initWithContentsOfURL_(theURL)

theImage's setSize_({50, 50})

swatch_preview's setImage_(theImage)

end try


Thanks,


Mark

xcode-OTHER, Mac OS X (10.7.5)

Posted on Nov 11, 2012 6:39 AM

Reply
Question marked as Best reply

Posted on Nov 11, 2012 7:55 AM

Take a look at the NSView Class Reference, and try the display method:

swatch_preview's display()

2 replies

Need help Updating Images whilst app is running?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.