Set image of image cell

Hi.

I have an AppleScript Studio app with a table. When a person drops an item onto the table, the file’s path appears in the Files column. I have a script ready that can parse the app’s Info.plist and returns the path of the icon. Here is the script:


on getIcon(apath)
set iconpath to 0
	set sourceplist to apath & "/Contents/Info.plist"
	tell application "System Events"
		if property list item "CFBundleIconFile" of contents of property list file sourceplist exists then
			set iconpath to (value of property list item "CFBundleIconFile" of contents of property list file sourceplist)
			if iconpath does not contain ".icns" or ".png" or ".tiff" or ".jpg" or ".jpeg" or ".bmp" or ".gif" or ".psd" or ".pict" or ".jp2" then
				set iconpath to iconpath & ".icns"
			end if
			set iconpath to apath & "/Contents/Resources/" & iconpath
		end if
	end tell
	return iconpath
end getIcon

This code works fine. Now I have an Icons column in my table with an image cell in it, and I want to set the image of the image cell to the image whose path is returned by the getIcon script. Is that possible?

Thanks

Tim Bumgarner has a sample on his iDisk that demonstrats how to do this.

I have not seen an example elsewhere.

Cheers,

Craig

That example didn’t seem to work for me. Any other way to do it?

I know how to do it in RubyCocoa and Obj-C but not in AppleScript.
The example above is the only code I have ever seen on the subject.

I know it is frustrating but dig through the example and figure out how he got it to work.
Then you should be able to implement it in your code.

Sorry I could not be more help.

Craig