image views

what is wrong with this code?

set contents of box "imageThingy" of window "main" to "icon"

when i run i get the “NSCannotCreateScriptCommandError (10)” error, which means it is probably something with the code.
I have the image in my “images” folder in the project file, and i cannot figure out what this is.

Huh? :confused:

Have you not looked at any documentation, examples, or searched the internet for an answer? Your sample code is so rediculous I don’t know where to begin criticizing it. Your thread subject is the only place you mention image views, and then you proceed to reference a box in your sample code. This is the first place you’ve gone astray. Why would you set the contents of a box if you’re trying to set the image of an image view? Secondly, if you’d bothered to read apple’s documentation for a box, you’d find that you can not set the ‘contents’ of a box… an obvious reason why your code won’t work. Then, if you’d bothered to read the image view documentation you’d have found all of the commands and properties available for the image view object, including a detailed and fundamental example of how to load an image into an image view…

set image of image view "image" of window "main"  to load image "AboutBox"

Please don’t expect us to bend over backwards for you when you’ve obviously not done any work for yourself. Your post was such an obvious misuse of this forum, I wonder why I’m even bothering to post a reply. Please read the new Posting Guidelines and then get intimate with the documentation before posting threads like this. Twelve seconds spent searching google would have answered this question in the time it took you to post.